[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 21/27] target/ppc: cpu_init: Rename software TLB function
From: |
David Gibson |
Subject: |
Re: [PATCH 21/27] target/ppc: cpu_init: Rename software TLB function |
Date: |
Wed, 16 Feb 2022 13:56:27 +1100 |
On Tue, Feb 15, 2022 at 06:41:42PM -0300, Fabiano Rosas wrote:
> With the removal of the 7450 software TLB code, the only software TLBs
> that we support currently are the 6xx and 7xx, so there's no need for
> this function to indicate that in its name anymore.
I don't think this is a good idea. It may not have a function of a
similar name, but 40x and 44x certainly have a software tlb with an
entirely different programming model. So I think it makes sense to
keep the 6xx/7xx reference here for clarity.
>
> Also, it's best to use a generic name for functions that are shared
> and only mention the specific CPU name when the function applies only
> to that (or similar) CPUs.
>
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
> ---
> target/ppc/cpu_init.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
> index b4913e25de..3e687d0301 100644
> --- a/target/ppc/cpu_init.c
> +++ b/target/ppc/cpu_init.c
> @@ -428,7 +428,7 @@ static void register_high_BATs(CPUPPCState *env)
> }
>
> /* Softare table search registers */
> -static void register_6xx_7xx_soft_tlb(CPUPPCState *env, int nb_tlbs, int
> nb_ways)
> +static void register_soft_tlb_sprs(CPUPPCState *env, int nb_tlbs, int
> nb_ways)
> {
> #if !defined(CONFIG_USER_ONLY)
> env->nb_tlb = nb_tlbs;
> @@ -3029,7 +3029,7 @@ static void init_proc_G2(CPUPPCState *env)
> /* Memory management */
> register_low_BATs(env);
> register_high_BATs(env);
> - register_6xx_7xx_soft_tlb(env, 64, 2);
> + register_soft_tlb_sprs(env, 64, 2);
> init_excp_G2(env);
> env->dcache_line_size = 32;
> env->icache_line_size = 32;
> @@ -3738,7 +3738,7 @@ static void init_proc_603(CPUPPCState *env)
>
> /* Memory management */
> register_low_BATs(env);
> - register_6xx_7xx_soft_tlb(env, 64, 2);
> + register_soft_tlb_sprs(env, 64, 2);
> init_excp_603(env);
> env->dcache_line_size = 32;
> env->icache_line_size = 32;
> @@ -4499,7 +4499,7 @@ static void init_proc_745(CPUPPCState *env)
> /* Memory management */
> register_low_BATs(env);
> register_high_BATs(env);
> - register_6xx_7xx_soft_tlb(env, 64, 2);
> + register_soft_tlb_sprs(env, 64, 2);
> init_excp_7x5(env);
> env->dcache_line_size = 32;
> env->icache_line_size = 32;
--
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
- [PATCH 17/27] target/ppc: cpu_init: Move 604e SPR registration into a function, (continued)
- [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
- [PATCH 15/27] target/ppc: cpu_init: Move 755 L2 cache SPRs into a function, Fabiano Rosas, 2022/02/15
- [PATCH 21/27] target/ppc: cpu_init: Rename software TLB function, Fabiano Rosas, 2022/02/15
- Re: [PATCH 21/27] target/ppc: cpu_init: Rename software TLB function,
David Gibson <=
- [PATCH 25/27] target/ppc: cpu_init: Move SPR registration macros to a header, Fabiano Rosas, 2022/02/15
- [PATCH 23/27] target/ppc: cpu_init: Remove register_usprg3_sprs, Fabiano Rosas, 2022/02/15
- [PATCH 19/27] target/ppc: cpu_init: Reuse init_proc_604 for the 604e, Fabiano Rosas, 2022/02/15
- [PATCH 22/27] target/ppc: cpu_init: Rename register_ne_601_sprs, Fabiano Rosas, 2022/02/15