summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFabiano Rosas2022-02-18 08:34:15 +0100
committerCédric Le Goater2022-02-18 08:34:15 +0100
commitd2b29d0ade43db99af4f7a176abb55c0a2fbf0e4 (patch)
treed33c0c962926174ffc1e0b4a2fbbb1e30db37902 /target
parenttarget/ppc: cpu_init: Deduplicate 440 SPR registration (diff)
downloadqemu-d2b29d0ade43db99af4f7a176abb55c0a2fbf0e4.tar.gz
qemu-d2b29d0ade43db99af4f7a176abb55c0a2fbf0e4.tar.xz
qemu-d2b29d0ade43db99af4f7a176abb55c0a2fbf0e4.zip
target/ppc: cpu_init: Deduplicate 603 SPR registration
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20220216162426.1885923-12-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'target')
-rw-r--r--target/ppc/cpu_init.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 43ba32423c..017a3b4b29 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -710,6 +710,15 @@ static void register_603_sprs(CPUPPCState *env)
&spr_read_generic, &spr_write_generic,
0x00000000);
+ spr_register(env, SPR_HID0, "HID0",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ 0x00000000);
+
+ spr_register(env, SPR_HID1, "HID1",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ 0x00000000);
}
/* SPR specific to PowerPC G2 implementation */
@@ -3158,16 +3167,6 @@ static void init_proc_e300(CPUPPCState *env)
register_sdr1_sprs(env);
register_603_sprs(env);
/* hardware implementation registers */
- spr_register(env, SPR_HID0, "HID0",
- SPR_NOACCESS, SPR_NOACCESS,
- &spr_read_generic, &spr_write_generic,
- 0x00000000);
-
- spr_register(env, SPR_HID1, "HID1",
- SPR_NOACCESS, SPR_NOACCESS,
- &spr_read_generic, &spr_write_generic,
- 0x00000000);
-
spr_register(env, SPR_HID2, "HID2",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic,
@@ -3714,16 +3713,7 @@ static void init_proc_603(CPUPPCState *env)
register_ne_601_sprs(env);
register_sdr1_sprs(env);
register_603_sprs(env);
- /* hardware implementation registers */
- spr_register(env, SPR_HID0, "HID0",
- SPR_NOACCESS, SPR_NOACCESS,
- &spr_read_generic, &spr_write_generic,
- 0x00000000);
- spr_register(env, SPR_HID1, "HID1",
- SPR_NOACCESS, SPR_NOACCESS,
- &spr_read_generic, &spr_write_generic,
- 0x00000000);
/* Memory management */
register_low_BATs(env);
register_6xx_7xx_soft_tlb(env, 64, 2);