[PATCH v3 23/33] target/ppc/mmu_common.c: Remove BookE from direct store handling

BALATON Zoltan posted 33 patches 6 months, 3 weeks ago
Maintainers: BALATON Zoltan <balaton@eik.bme.hu>, Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>
There is a newer version of this series
[PATCH v3 23/33] target/ppc/mmu_common.c: Remove BookE from direct store handling
Posted by BALATON Zoltan 6 months, 3 weeks ago
As BookE never returns -4 we can drop BookE from the direct store case
in ppc_jumbo_xlate().

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 target/ppc/mmu_common.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 87cac12d68..03b834eb77 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc/mmu_common.c
@@ -1287,12 +1287,7 @@ static bool ppc_jumbo_xlate(PowerPCCPU *cpu, vaddr eaddr,
             /* Direct store exception */
             /* No code fetch is allowed in direct-store areas */
             cs->exception_index = POWERPC_EXCP_ISI;
-            if ((env->mmu_model == POWERPC_MMU_BOOKE) ||
-                (env->mmu_model == POWERPC_MMU_BOOKE206)) {
-                env->error_code = 0;
-            } else {
-                env->error_code = 0x10000000;
-            }
+            env->error_code = 0x10000000;
             break;
         }
     } else {
-- 
2.30.9
Re: [PATCH v3 23/33] target/ppc/mmu_common.c: Remove BookE from direct store handling
Posted by Nicholas Piggin 6 months, 2 weeks ago
On Wed May 8, 2024 at 10:15 AM AEST, BALATON Zoltan wrote:
> As BookE never returns -4 we can drop BookE from the direct store case
> in ppc_jumbo_xlate().
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

> ---
>  target/ppc/mmu_common.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
> index 87cac12d68..03b834eb77 100644
> --- a/target/ppc/mmu_common.c
> +++ b/target/ppc/mmu_common.c
> @@ -1287,12 +1287,7 @@ static bool ppc_jumbo_xlate(PowerPCCPU *cpu, vaddr eaddr,
>              /* Direct store exception */
>              /* No code fetch is allowed in direct-store areas */
>              cs->exception_index = POWERPC_EXCP_ISI;
> -            if ((env->mmu_model == POWERPC_MMU_BOOKE) ||
> -                (env->mmu_model == POWERPC_MMU_BOOKE206)) {
> -                env->error_code = 0;
> -            } else {
> -                env->error_code = 0x10000000;
> -            }
> +            env->error_code = 0x10000000;
>              break;
>          }
>      } else {