All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: David Gibson <david@gibson.dropbear.id.au>,
	Alexander Graf <agraf@suse.de>,
	qemu-ppc@nongnu.org
Subject: [Qemu-devel] [PATCH for-2.11 3/6] ppc: make cpu alias point only to real cpu models
Date: Thu, 24 Aug 2017 10:21:48 +0200	[thread overview]
Message-ID: <1503562911-2776-4-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1503562911-2776-1-git-send-email-imammedo@redhat.com>

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 <imammedo@redhat.com>
---
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[] = {
     { "X2VP50", "X2VP20" },
 
     { "440EP", "440EPB" },
+#if defined(TODO_USER_ONLY)
     { "440GP", "440GPC" },
     { "440GR", "440GRA" },
     { "440GX", "440GXF" },
@@ -1272,36 +1273,37 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
     { "MPC875", "MPC8XX" },
     { "MPC880", "MPC8XX" },
     { "MPC885", "MPC8XX" },
+#endif
 
     /* PowerPC MPC603 microcontrollers */
     { "MPC8240", "603" },
 
-    { "MPC52XX", "MPC5200" },
+    { "MPC52XX", "MPC5200_V12" },
     { "MPC5200", "MPC5200_V12" },
     { "MPC5200B", "MPC5200B_V21" },
 
-    { "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[] = {
     { "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[] = {
     { "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[] = {
 
     /* 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 }
 };
-- 
2.7.4

  parent reply	other threads:[~2017-08-24  8:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24  8:21 [Qemu-devel] [PATCH for-2.11 0/6] ppc: cpu_model handling cleanups Igor Mammedov
2017-08-24  8:21 ` [Qemu-devel] [PATCH for-2.11 1/6] ppc: use macros to make cpu type name from string literal Igor Mammedov
2017-08-25  1:30   ` David Gibson
2017-08-25  7:28     ` Igor Mammedov
2017-08-25 13:24       ` David Gibson
2017-08-24  8:21 ` [Qemu-devel] [PATCH for-2.11 2/6] ppc: make cpu_model translation to type consistent Igor Mammedov
2017-08-25  1:38   ` David Gibson
2017-08-25  7:27     ` Igor Mammedov
2017-08-25  9:45       ` David Gibson
2017-08-25 11:40         ` Igor Mammedov
2017-08-25 13:28           ` David Gibson
2017-08-25 14:34             ` Igor Mammedov
2017-08-29  7:26               ` David Gibson
2017-08-24  8:21 ` Igor Mammedov [this message]
2017-08-25  1:40   ` [Qemu-devel] [PATCH for-2.11 3/6] ppc: make cpu alias point only to real cpu models David Gibson
2017-08-24  8:21 ` [Qemu-devel] [PATCH for-2.11 4/6] ppc: replace inter-function cyclic dependency/recurssion with 2 simple lookups Igor Mammedov
2017-08-25  4:12   ` David Gibson
2017-08-25  7:34     ` Igor Mammedov
2017-08-30  3:05       ` David Gibson
2017-08-30  6:16         ` Igor Mammedov
2017-08-24  8:21 ` [Qemu-devel] [PATCH for-2.11 5/6] ppc: simplify cpu model lookup by PVR Igor Mammedov
2017-08-25  4:16   ` David Gibson
2017-08-25  7:40     ` Igor Mammedov
2017-08-25  9:32       ` David Gibson
2017-08-25 11:41         ` Igor Mammedov
2017-08-30 10:50         ` Igor Mammedov
2017-08-31  5:54           ` David Gibson
2017-08-24  8:21 ` [Qemu-devel] [PATCH for-2.11 6/6] ppc: drop caching ObjectClass from PowerPCCPUAlias Igor Mammedov
2017-08-25  4:22   ` David Gibson
2017-08-25  7:49     ` Igor Mammedov
2017-08-29  7:30       ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1503562911-2776-4-git-send-email-imammedo@redhat.com \
    --to=imammedo@redhat.com \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.