From nobody Mon Feb 9 00:30:57 2026 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1503563171472201.4846855580937; Thu, 24 Aug 2017 01:26:11 -0700 (PDT) Received: from localhost ([::1]:47199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dknSs-00031I-6w for importer@patchew.org; Thu, 24 Aug 2017 04:26:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dknOq-0008Ef-Qu for qemu-devel@nongnu.org; Thu, 24 Aug 2017 04:22:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dknOp-0006hV-Fw for qemu-devel@nongnu.org; Thu, 24 Aug 2017 04:22:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40010) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dknOp-0006hO-6U; Thu, 24 Aug 2017 04:21:59 -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 326325D686; Thu, 24 Aug 2017 08:21:58 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.34.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37C6469AFD; Thu, 24 Aug 2017 08:21:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 326325D686 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=imammedo@redhat.com From: Igor Mammedov To: qemu-devel@nongnu.org Date: Thu, 24 Aug 2017 10:21:48 +0200 Message-Id: <1503562911-2776-4-git-send-email-imammedo@redhat.com> In-Reply-To: <1503562911-2776-1-git-send-email-imammedo@redhat.com> References: <1503562911-2776-1-git-send-email-imammedo@redhat.com> 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.39]); Thu, 24 Aug 2017 08:21:58 +0000 (UTC) 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] [PATCH for-2.11 3/6] ppc: make cpu alias point only to real cpu models 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: qemu-ppc@nongnu.org, Alexander Graf , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" alias pointing to another alias forces lookup code to do recurrsive translation till real cpu model is reached. Drop this nonsence and make each alias point to cpu model that has corresponding CPU type. It will allow to drop recurrsion in cpu model translation code and actually make ppc_cpu_aliases[] content use PowerPCCPUAlias fields properly (i.e. alias goes into .alias and model goes into .model) While at it add TODO defines around aliases that point to cpu models excluded by the same TODO defines. Signed-off-by: Igor Mammedov Acked-by: David Gibson --- If it were up to me, I'd remove all TODO cpu models as dead code and make whomever wants to add them back to do so with actual implementation. --- target/ppc/cpu-models.h | 2 +- target/ppc/cpu-models.c | 56 ++++++++++++++++++++++++++-------------------= ---- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/target/ppc/cpu-models.h b/target/ppc/cpu-models.h index b563c45..d748c68 100644 --- a/target/ppc/cpu-models.h +++ b/target/ppc/cpu-models.h @@ -24,7 +24,7 @@ /** * PowerPCCPUAlias: * @alias: The alias name. - * @model: The CPU model @alias refers to. + * @model: The CPU model @alias refers to, that directly resolves into CPU= type * * A mapping entry from CPU @alias to CPU @model. */ diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c index 346b6b1..f917b9d 100644 --- a/target/ppc/cpu-models.c +++ b/target/ppc/cpu-models.c @@ -1235,6 +1235,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] =3D { { "X2VP50", "X2VP20" }, =20 { "440EP", "440EPB" }, +#if defined(TODO_USER_ONLY) { "440GP", "440GPC" }, { "440GR", "440GRA" }, { "440GX", "440GXF" }, @@ -1272,36 +1273,37 @@ PowerPCCPUAlias ppc_cpu_aliases[] =3D { { "MPC875", "MPC8XX" }, { "MPC880", "MPC8XX" }, { "MPC885", "MPC8XX" }, +#endif =20 /* PowerPC MPC603 microcontrollers */ { "MPC8240", "603" }, =20 - { "MPC52XX", "MPC5200" }, + { "MPC52XX", "MPC5200_V12" }, { "MPC5200", "MPC5200_V12" }, { "MPC5200B", "MPC5200B_V21" }, =20 - { "MPC82XX", "MPC8280" }, - { "POWERQUICC-II", "MPC82XX" }, + { "MPC82XX", "G2LEGP3" }, + { "POWERQUICC-II", "G2LEGP3" }, { "MPC8241", "G2HIP4" }, { "MPC8245", "G2HIP4" }, { "MPC8247", "G2LEGP3" }, { "MPC8248", "G2LEGP3" }, - { "MPC8250", "MPC8250_HIP4" }, + { "MPC8250", "G2HIP4" }, { "MPC8250_HIP3", "G2HIP3" }, { "MPC8250_HIP4", "G2HIP4" }, - { "MPC8255", "MPC8255_HIP4" }, + { "MPC8255", "G2HIP4" }, { "MPC8255_HIP3", "G2HIP3" }, { "MPC8255_HIP4", "G2HIP4" }, - { "MPC8260", "MPC8260_HIP4" }, + { "MPC8260", "G2HIP4" }, { "MPC8260_HIP3", "G2HIP3" }, { "MPC8260_HIP4", "G2HIP4" }, - { "MPC8264", "MPC8264_HIP4" }, + { "MPC8264", "G2HIP4" }, { "MPC8264_HIP3", "G2HIP3" }, { "MPC8264_HIP4", "G2HIP4" }, - { "MPC8265", "MPC8265_HIP4" }, + { "MPC8265", "G2HIP4" }, { "MPC8265_HIP3", "G2HIP3" }, { "MPC8265_HIP4", "G2HIP4" }, - { "MPC8266", "MPC8266_HIP4" }, + { "MPC8266", "G2HIP4" }, { "MPC8266_HIP3", "G2HIP3" }, { "MPC8266_HIP4", "G2HIP4" }, { "MPC8270", "G2LEGP3" }, @@ -1339,18 +1341,18 @@ PowerPCCPUAlias ppc_cpu_aliases[] =3D { { "601V", "601_V2" }, { "VANILLA", "603" }, { "603E", "603E_V4.1" }, - { "STRETCH", "603E" }, + { "STRETCH", "603E_V4.1" }, { "VAILLANT", "603E7V" }, { "603R", "603E7T" }, - { "GOLDENEYE", "603R" }, + { "GOLDENEYE", "603E7T" }, { "604E", "604E_V2.4" }, - { "SIROCCO", "604E" }, + { "SIROCCO", "604E_V2.4" }, { "MACH5", "604R" }, { "740", "740_V3.1" }, - { "ARTHUR", "740" }, + { "ARTHUR", "740_V3.1" }, { "750", "750_V3.1" }, - { "TYPHOON", "750" }, - { "G3", "750" }, + { "TYPHOON", "750_V3.1" }, + { "G3", "750_V3.1" }, { "CONAN/DOYLE", "750P" }, { "750CL", "750CL_V2.0" }, { "750CX", "750CX_V2.2" }, @@ -1358,32 +1360,34 @@ PowerPCCPUAlias ppc_cpu_aliases[] =3D { { "750FX", "750FX_V2.3" }, { "750GX", "750GX_V1.2" }, { "750L", "750L_V3.2" }, - { "LONESTAR", "750L" }, + { "LONESTAR", "750L_V3.2" }, { "745", "745_V2.8" }, { "755", "755_V2.8" }, - { "GOLDFINGER", "755" }, + { "GOLDFINGER", "755_V2.8" }, { "7400", "7400_V2.9" }, - { "MAX", "7400" }, - { "G4", "7400" }, + { "MAX", "7400_V2.9" }, + { "G4", "7400_V2.9" }, { "7410", "7410_V1.4" }, - { "NITRO", "7410" }, + { "NITRO", "7410_V1.4" }, { "7448", "7448_V2.1" }, { "7450", "7450_V2.1" }, - { "VGER", "7450" }, + { "VGER", "7450_V2.1" }, { "7441", "7441_V2.3" }, { "7451", "7451_V2.3" }, { "7445", "7445_V3.2" }, { "7455", "7455_V3.2" }, - { "APOLLO6", "7455" }, + { "APOLLO6", "7455_V3.2" }, { "7447", "7447_V1.1" }, { "7457", "7457_V1.2" }, - { "APOLLO7", "7457" }, + { "APOLLO7", "7457_V1.2" }, { "7447A", "7447A_V1.2" }, { "7457A", "7457A_V1.2" }, { "APOLLO7PM", "7457A_V1.0" }, #if defined(TARGET_PPC64) +#if defined(TODO) { "POWER3", "630" }, { "POWER3+", "631" }, +#endif { "POWER5+", "POWER5+_V2.1" }, { "POWER5GS", "POWER5+_V2.1" }, { "POWER7", "POWER7_V2.3" }, @@ -1399,10 +1403,10 @@ PowerPCCPUAlias ppc_cpu_aliases[] =3D { =20 /* Generic PowerPCs */ #if defined(TARGET_PPC64) - { "PPC64", "970FX" }, + { "PPC64", "970FX_V3.1" }, #endif { "PPC32", "604" }, - { "PPC", "PPC32" }, - { "DEFAULT", "PPC" }, + { "PPC", "604" }, + { "DEFAULT", "604" }, { NULL, NULL } }; --=20 2.7.4