[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 49/72] target/ppc/mmu_common.c: Split out BookE cases before check
From: |
Nicholas Piggin |
Subject: |
[PULL 49/72] target/ppc/mmu_common.c: Split out BookE cases before checking real mode |
Date: |
Fri, 24 May 2024 09:07:22 +1000 |
From: BALATON Zoltan <balaton@eik.bme.hu>
BookE does not have real mode so split off and handle it first in
get_physical_address_wtlb() before checking for real mode for other
MMU models.
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
target/ppc/mmu_common.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 03d9e6bfda..9f177b6976 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc/mmu_common.c
@@ -1175,6 +1175,13 @@ int get_physical_address_wtlb(CPUPPCState *env,
mmu_ctx_t *ctx,
int ret = -1;
bool real_mode;
+ if (env->mmu_model == POWERPC_MMU_BOOKE) {
+ return mmubooke_get_physical_address(env, ctx, eaddr, access_type);
+ } else if (env->mmu_model == POWERPC_MMU_BOOKE206) {
+ return mmubooke206_get_physical_address(env, ctx, eaddr, access_type,
+ mmu_idx);
+ }
+
real_mode = (type == ACCESS_CODE) ? !FIELD_EX64(env->msr, MSR, IR)
: !FIELD_EX64(env->msr, MSR, DR);
@@ -1195,13 +1202,6 @@ int get_physical_address_wtlb(CPUPPCState *env,
mmu_ctx_t *ctx,
ret = mmu40x_get_physical_address(env, ctx, eaddr, access_type);
}
break;
- case POWERPC_MMU_BOOKE:
- ret = mmubooke_get_physical_address(env, ctx, eaddr, access_type);
- break;
- case POWERPC_MMU_BOOKE206:
- ret = mmubooke206_get_physical_address(env, ctx, eaddr, access_type,
- mmu_idx);
- break;
case POWERPC_MMU_REAL:
if (real_mode) {
ret = check_physical(env, ctx, eaddr, access_type);
--
2.43.0
- [PULL 36/72] target/ppc: Implement LDBAR, TTR SPRs, (continued)
- [PULL 36/72] target/ppc: Implement LDBAR, TTR SPRs, Nicholas Piggin, 2024/05/23
- [PULL 37/72] target/ppc: Implement SPRC/SPRD SPRs, Nicholas Piggin, 2024/05/23
- [PULL 47/72] target/ppc/mmu_common.c: Move some debug logging, Nicholas Piggin, 2024/05/23
- [PULL 40/72] target/ppc: Remove unused helper, Nicholas Piggin, 2024/05/23
- [PULL 41/72] target/ppc/mmu_common.c: Move calculation of a value closer to its usage, Nicholas Piggin, 2024/05/23
- [PULL 48/72] target/ppc/mmu_common.c: Eliminate ret from mmu6xx_get_physical_address(), Nicholas Piggin, 2024/05/23
- [PULL 45/72] target/ppc/mmu_common.c: Introduce mmu6xx_get_physical_address(), Nicholas Piggin, 2024/05/23
- [PULL 50/72] target/ppc/mmu_common.c: Split off real mode cases in get_physical_address_wtlb(), Nicholas Piggin, 2024/05/23
- [PULL 46/72] target/ppc/mmu_common.c: Move else branch to avoid large if block, Nicholas Piggin, 2024/05/23
- [PULL 44/72] target/ppc/mmu_common.c: Drop cases for unimplemented MPC8xx MMU, Nicholas Piggin, 2024/05/23
- [PULL 49/72] target/ppc/mmu_common.c: Split out BookE cases before checking real mode,
Nicholas Piggin <=
- [PULL 51/72] target/ppc/mmu_common.c: Inline and remove check_physical(), Nicholas Piggin, 2024/05/23
- [PULL 52/72] target/ppc/mmu_common.c: Fix misindented qemu_log_mask() calls, Nicholas Piggin, 2024/05/23
- [PULL 56/72] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke_get_physical_address(), Nicholas Piggin, 2024/05/23
- [PULL 53/72] target/ppc/mmu_common.c: Deindent ppc_jumbo_xlate(), Nicholas Piggin, 2024/05/23
- [PULL 55/72] target/ppc/mmu_common.c: Don't use mmu_ctx_t for mmu40x_get_physical_address(), Nicholas Piggin, 2024/05/23
- [PULL 54/72] target/ppc/mmu_common.c: Replace hard coded constants in ppc_jumbo_xlate(), Nicholas Piggin, 2024/05/23
- [PULL 57/72] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke206_get_physical_address(), Nicholas Piggin, 2024/05/23
- [PULL 60/72] target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 1, Nicholas Piggin, 2024/05/23
- [PULL 61/72] target/ppc/mmu_common.c: Simplify ppc_booke_xlate() part 2, Nicholas Piggin, 2024/05/23
- [PULL 58/72] target/ppc/mmu_common.c: Remove BookE from direct store handling, Nicholas Piggin, 2024/05/23