From nobody Sun Nov 2 11:50:18 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1509115424619101.68893340598152; Fri, 27 Oct 2017 07:43:44 -0700 (PDT) Received: from localhost ([::1]:57640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e85r2-0002M2-C8 for importer@patchew.org; Fri, 27 Oct 2017 10:43:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e85XA-0006he-UT for qemu-devel@nongnu.org; Fri, 27 Oct 2017 10:22:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e85XA-0001My-0J for qemu-devel@nongnu.org; Fri, 27 Oct 2017 10:22:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39676) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e85X9-0001M6-QB for qemu-devel@nongnu.org; Fri, 27 Oct 2017 10:22:51 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE434369C4; Fri, 27 Oct 2017 14:22:50 +0000 (UTC) Received: from localhost (ovpn-116-67.gru2.redhat.com [10.97.116.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id E716D80DF1; Fri, 27 Oct 2017 14:22:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DE434369C4 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ehabkost@redhat.com From: Eduardo Habkost To: Peter Maydell Date: Fri, 27 Oct 2017 16:20:49 +0200 Message-Id: <20171027142107.15542-22-ehabkost@redhat.com> In-Reply-To: <20171027142107.15542-1-ehabkost@redhat.com> References: <20171027142107.15542-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 27 Oct 2017 14:22:51 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL v2 21/39] xtensa: cleanup cpu type name composition X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Igor Mammedov use new XTENSA_CPU_TYPE_NAME to compose CPU type name to bring xtensa in line with all other targets that will similar macro. Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <1507211474-188400-25-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost --- target/xtensa/cpu.h | 4 ++++ target/xtensa/cpu.c | 2 +- target/xtensa/helper.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index 48033313c5..b17d7d96e9 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -469,11 +469,15 @@ void xtensa_cpu_do_unaligned_access(CPUState *cpu, va= ddr addr, #define cpu_signal_handler cpu_xtensa_signal_handler #define cpu_list xtensa_cpu_list =20 +#define XTENSA_CPU_TYPE_SUFFIX "-" TYPE_XTENSA_CPU +#define XTENSA_CPU_TYPE_NAME(model) model XTENSA_CPU_TYPE_SUFFIX + #ifdef TARGET_WORDS_BIGENDIAN #define XTENSA_DEFAULT_CPU_MODEL "fsf" #else #define XTENSA_DEFAULT_CPU_MODEL "dc232b" #endif +#define XTENSA_DEFAULT_CPU_TYPE XTENSA_CPU_TYPE_NAME(XTENSA_DEFAULT_CPU_MO= DEL) =20 #define cpu_init(cpu_model) cpu_generic_init(TYPE_XTENSA_CPU, cpu_model) =20 diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index a5651e5dab..91961789a5 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -83,7 +83,7 @@ static ObjectClass *xtensa_cpu_class_by_name(const char *= cpu_model) ObjectClass *oc; char *typename; =20 - typename =3D g_strdup_printf("%s-" TYPE_XTENSA_CPU, cpu_model); + typename =3D g_strdup_printf(XTENSA_CPU_TYPE_NAME("%s"), cpu_model); oc =3D object_class_by_name(typename); g_free(typename); if (oc =3D=3D NULL || !object_class_dynamic_cast(oc, TYPE_XTENSA_CPU) = || diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index e8fba20918..216f1988aa 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -76,7 +76,7 @@ void xtensa_register_core(XtensaConfigList *node) =20 node->next =3D xtensa_cores; xtensa_cores =3D node; - type.name =3D g_strdup_printf("%s-" TYPE_XTENSA_CPU, node->config->nam= e); + type.name =3D g_strdup_printf(XTENSA_CPU_TYPE_NAME("%s"), node->config= ->name); type_register(&type); g_free((gpointer)type.name); } --=20 2.13.6