[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 13/27] target/ppc: cpu_init: Deduplicate 7xx SPR registration
From: |
David Gibson |
Subject: |
Re: [PATCH 13/27] target/ppc: cpu_init: Deduplicate 7xx SPR registration |
Date: |
Wed, 16 Feb 2022 13:23:09 +1100 |
On Tue, Feb 15, 2022 at 06:41:34PM -0300, Fabiano Rosas wrote:
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
One nit: this doesn't cover 745 and 755, since they're handled by the
next patch - a note of that would have been useful.
That said, it only stands out because in general this series has been
delightfully easy to review.
> ---
> target/ppc/cpu_init.c | 68 +++++++------------------------------------
> 1 file changed, 11 insertions(+), 57 deletions(-)
>
> diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
> index c54f10cb48..2fd6bf21ca 100644
> --- a/target/ppc/cpu_init.c
> +++ b/target/ppc/cpu_init.c
> @@ -580,6 +580,17 @@ static void register_7xx_sprs(CPUPPCState *env)
> SPR_NOACCESS, SPR_NOACCESS,
> &spr_read_generic, &spr_write_generic,
> 0x00000000);
> +
> + /* 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);
> }
>
> #ifdef TARGET_PPC64
> @@ -3946,16 +3957,7 @@ static void init_proc_740(CPUPPCState *env)
> register_7xx_sprs(env);
> /* Thermal management */
> register_thrm_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);
> init_excp_7x0(env);
> @@ -4016,16 +4018,7 @@ static void init_proc_750(CPUPPCState *env)
> 0x00000000);
> /* Thermal management */
> register_thrm_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);
> /*
> @@ -4125,16 +4118,6 @@ static void init_proc_750cl(CPUPPCState *env)
> &spr_read_generic, &spr_write_generic,
> 0x00000000);
> /* 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_750CL_HID2, "HID2",
> SPR_NOACCESS, SPR_NOACCESS,
> &spr_read_generic, &spr_write_generic,
> @@ -4290,16 +4273,7 @@ static void init_proc_750cx(CPUPPCState *env)
> SPR_NOACCESS, SPR_NOACCESS,
> &spr_read_generic, &spr_write_generic,
> 0x00000000);
> - /* 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);
> /* PowerPC 750cx has 8 DBATs and 8 IBATs */
> @@ -4368,16 +4342,6 @@ static void init_proc_750fx(CPUPPCState *env)
> &spr_read_generic, &spr_write_generic,
> 0x00000000);
> /* 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_750FX_HID2, "HID2",
> SPR_NOACCESS, SPR_NOACCESS,
> &spr_read_generic, &spr_write_generic,
> @@ -4450,16 +4414,6 @@ static void init_proc_750gx(CPUPPCState *env)
> &spr_read_generic, &spr_write_generic,
> 0x00000000);
> /* 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_750FX_HID2, "HID2",
> SPR_NOACCESS, SPR_NOACCESS,
> &spr_read_generic, &spr_write_generic,
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- Re: [PATCH 06/27] target/ppc: cpu_init: Move 405 SPRs into register_405_sprs, (continued)
- [PATCH 10/27] target/ppc: cpu_init: Deduplicate 440 SPR registration, Fabiano Rosas, 2022/02/15
- [PATCH 09/27] target/ppc: cpu_init: Decouple 74xx SPR registration from 7xx, Fabiano Rosas, 2022/02/15
- [PATCH 08/27] target/ppc: cpu_init: Decouple G2 SPR registration from 755, Fabiano Rosas, 2022/02/15
- [PATCH 11/27] target/ppc: cpu_init: Deduplicate 603 SPR registration, Fabiano Rosas, 2022/02/15
- [PATCH 13/27] target/ppc: cpu_init: Deduplicate 7xx SPR registration, Fabiano Rosas, 2022/02/15
- Re: [PATCH 13/27] target/ppc: cpu_init: Deduplicate 7xx SPR registration,
David Gibson <=
- [PATCH 12/27] target/ppc: cpu_init: Deduplicate 604 SPR registration, Fabiano Rosas, 2022/02/15
- [PATCH 16/27] target/ppc: cpu_init: Move e300 SPR registration into a function, Fabiano Rosas, 2022/02/15
- [PATCH 17/27] target/ppc: cpu_init: Move 604e SPR registration into a function, Fabiano Rosas, 2022/02/15
- [PATCH 14/27] target/ppc: cpu_init: Deduplicate 755 SPR registration, Fabiano Rosas, 2022/02/15
- [PATCH 18/27] target/ppc: cpu_init: Reuse init_proc_603 for the e300, Fabiano Rosas, 2022/02/15