[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 34/39] target/ppc: cpu_init: Remove register_usprg3_sprs
From: |
Cédric Le Goater |
Subject: |
[PULL 34/39] target/ppc: cpu_init: Remove register_usprg3_sprs |
Date: |
Fri, 18 Feb 2022 11:38:22 +0100 |
From: Fabiano Rosas <farosas@linux.ibm.com>
This function registers just one SPR and has only two callers, so open
code it.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20220216162426.1885923-23-farosas@linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
target/ppc/cpu_init.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 5980a6a4d312..452dbdda4db6 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -1072,14 +1072,6 @@ static void register_l3_ctrl(CPUPPCState *env)
0x00000000);
}
-static void register_usprg3_sprs(CPUPPCState *env)
-{
- spr_register(env, SPR_USPRG3, "USPRG3",
- &spr_read_ureg, SPR_NOACCESS,
- &spr_read_ureg, SPR_NOACCESS,
- 0x00000000);
-}
-
static void register_usprgh_sprs(CPUPPCState *env)
{
spr_register(env, SPR_USPRG4, "USPRG4",
@@ -3306,7 +3298,12 @@ static void init_proc_e500(CPUPPCState *env, int version)
break;
}
register_BookE_sprs(env, ivor_mask);
- register_usprg3_sprs(env);
+
+ spr_register(env, SPR_USPRG3, "USPRG3",
+ &spr_read_ureg, SPR_NOACCESS,
+ &spr_read_ureg, SPR_NOACCESS,
+ 0x00000000);
+
/* Processor identification */
spr_register(env, SPR_BOOKE_PIR, "PIR",
SPR_NOACCESS, SPR_NOACCESS,
@@ -6196,7 +6193,6 @@ static void init_tcg_pmu_power8(CPUPPCState *env)
static void init_proc_book3s_common(CPUPPCState *env)
{
register_non_embedded_sprs(env);
- register_usprg3_sprs(env);
register_book3s_altivec_sprs(env);
register_book3s_pmu_sup_sprs(env);
register_book3s_pmu_user_sprs(env);
@@ -6206,6 +6202,11 @@ static void init_proc_book3s_common(CPUPPCState *env)
* value is the one used by 74xx processors.
*/
vscr_init(env, 0x00010000);
+
+ spr_register(env, SPR_USPRG3, "USPRG3",
+ &spr_read_ureg, SPR_NOACCESS,
+ &spr_read_ureg, SPR_NOACCESS,
+ 0x00000000);
}
static void init_proc_970(CPUPPCState *env)
--
2.34.1
- [PULL 06/39] ppc: allow the hdecr timer to be created/destroyed, (continued)
- [PULL 06/39] ppc: allow the hdecr timer to be created/destroyed, Cédric Le Goater, 2022/02/18
- [PULL 08/39] target/ppc: make vhyp get_pate method take lpid and return success, Cédric Le Goater, 2022/02/18
- [PULL 37/39] target/ppc: cpu_init: Move SPR registration macros to a header, Cédric Le Goater, 2022/02/18
- [PULL 01/39] nvdimm: Add realize, unrealize callbacks to NVDIMMDevice class, Cédric Le Goater, 2022/02/18
- [PULL 04/39] target/ppc: raise HV interrupts for partition table entry problems, Cédric Le Goater, 2022/02/18
- [PULL 17/39] target/ppc: cpu_init: Avoid nested SPR register functions, Cédric Le Goater, 2022/02/18
- [PULL 16/39] target/ppc: cpu_init: Move Timebase registration into the common function, Cédric Le Goater, 2022/02/18
- [PULL 14/39] target/ppc: cpu_init: Remove G2LE init code, Cédric Le Goater, 2022/02/18
- [PULL 26/39] target/ppc: cpu_init: Deduplicate 7xx SPR registration, Cédric Le Goater, 2022/02/18
- [PULL 11/39] target/ppc: Introduce a vhyp framework for nested HV support, Cédric Le Goater, 2022/02/18
- [PULL 34/39] target/ppc: cpu_init: Remove register_usprg3_sprs,
Cédric Le Goater <=
- [PULL 24/39] target/ppc: cpu_init: Deduplicate 604 SPR registration, Cédric Le Goater, 2022/02/18
- [PULL 02/39] spapr: nvdimm: Implement H_SCM_FLUSH hcall, Cédric Le Goater, 2022/02/18
- [PULL 13/39] target/ppc: cpu_init: Remove not implemented comments, Cédric Le Goater, 2022/02/18
- [PULL 05/39] spapr: prevent hdec timer being set up under virtual hypervisor, Cédric Le Goater, 2022/02/18
- [PULL 28/39] target/ppc: cpu_init: Move e300 SPR registration into a function, Cédric Le Goater, 2022/02/18
- [PULL 03/39] spapr: nvdimm: Introduce spapr-nvdimm device, Cédric Le Goater, 2022/02/18
- [PULL 12/39] spapr: implement nested-hv capability for the virtual hypervisor, Cédric Le Goater, 2022/02/18
- [PULL 35/39] target/ppc: Rename spr_tcg.h to spr_common.h, Cédric Le Goater, 2022/02/18
- [PULL 21/39] target/ppc: cpu_init: Decouple 74xx SPR registration from 7xx, Cédric Le Goater, 2022/02/18
- [PULL 36/39] target/ppc: cpu_init: Expose some SPR registration helpers, Cédric Le Goater, 2022/02/18