From nobody Sun Nov 2 11:47:16 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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 1509027487114211.40858124289014; Thu, 26 Oct 2017 07:18:07 -0700 (PDT) Received: from localhost ([::1]:53181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7iyw-0006sL-DQ for importer@patchew.org; Thu, 26 Oct 2017 10:18:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7inJ-0004oe-9D for qemu-devel@nongnu.org; Thu, 26 Oct 2017 10:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7inD-00008R-9g for qemu-devel@nongnu.org; Thu, 26 Oct 2017 10:06:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51310) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e7inD-00007K-3E for qemu-devel@nongnu.org; Thu, 26 Oct 2017 10:05:55 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2FF3762E9C; Thu, 26 Oct 2017 14:05:54 +0000 (UTC) Received: from localhost (ovpn-116-4.gru2.redhat.com [10.97.116.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DB067F5CE; Thu, 26 Oct 2017 14:05:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2FF3762E9C Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ehabkost@redhat.com From: Eduardo Habkost To: Peter Maydell Date: Thu, 26 Oct 2017 16:03:46 +0200 Message-Id: <20171026140404.21948-22-ehabkost@redhat.com> In-Reply-To: <20171026140404.21948-1-ehabkost@redhat.com> References: <20171026140404.21948-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 26 Oct 2017 14:05:54 +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 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_0 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