[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 35/40] ppc: make cpu alias point only to real cpu model
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 35/40] ppc: make cpu alias point only to real cpu models |
Date: |
Fri, 8 Sep 2017 20:35:53 +1000 |
From: Igor Mammedov <address@hidden>
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 <address@hidden>
Acked-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/cpu-models.c | 56 ++++++++++++++++++++++++++-----------------------
target/ppc/cpu-models.h | 2 +-
2 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
index 07a48ca548..64629fc39f 100644
--- a/target/ppc/cpu-models.c
+++ b/target/ppc/cpu-models.c
@@ -1237,6 +1237,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
{ "x2vp50", "x2vp20" },
{ "440ep", "440epb" },
+#if defined(TODO_USER_ONLY)
{ "440gp", "440gpc" },
{ "440gr", "440gra" },
{ "440gx", "440gxf" },
@@ -1274,36 +1275,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" },
@@ -1341,18 +1343,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" },
@@ -1360,32 +1362,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" },
@@ -1401,10 +1405,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 }
};
diff --git a/target/ppc/cpu-models.h b/target/ppc/cpu-models.h
index eaa6849a42..629f112337 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.
*/
--
2.13.5
- [Qemu-ppc] [PULL 26/40] ppc4xx_i2c: Move to hw/i2c, (continued)
- [Qemu-ppc] [PULL 26/40] ppc4xx_i2c: Move to hw/i2c, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 25/40] ppc4xx_i2c: QOMify, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 36/40] ppc: replace inter-function cyclic dependency/recurssion with 2 simple lookups, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 40/40] ppc: spapr: Move VCPU ID calculation into sPAPR, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 31/40] PPC: KVM: Support machine option to set VSMT mode, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 33/40] ppc: use macros to make cpu type name from string literal, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 32/40] target/ppc: Remove old STATUS file, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 39/40] ppc: remove non implemented cpu models, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 30/40] spapr: fallback to raw mode if best compat mode cannot be set during CAS, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 37/40] ppc: simplify cpu model lookup by PVR, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 35/40] ppc: make cpu alias point only to real cpu models,
David Gibson <=
- [Qemu-ppc] [PULL 38/40] ppc: drop caching ObjectClass from PowerPCCPUAlias, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 22/40] ppc4xx: Move MAL from ppc405_uc to ppc4xx_devs, David Gibson, 2017/09/08
- [Qemu-ppc] [PULL 34/40] ppc: make cpu_model translation to type consistent, David Gibson, 2017/09/08
- Re: [Qemu-ppc] [PULL 00/40] ppc-for-2.11 queue 20170908, Peter Maydell, 2017/09/08