[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/43] target/ppc/mmu_common.c: Remove single use local variable
From: |
BALATON Zoltan |
Subject: |
[PATCH 14/43] target/ppc/mmu_common.c: Remove single use local variable |
Date: |
Mon, 27 May 2024 01:12:49 +0200 (CEST) |
In mmu6xx_get_physical_address() tagtet_page_bits local is declared
only to use TARGET_PAGE_BITS once. Drop the unneeded variable.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
target/ppc/mmu_common.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 5145bde7f9..0152e8d875 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc/mmu_common.c
@@ -321,7 +321,6 @@ static int mmu6xx_get_physical_address(CPUPPCState *env,
mmu_ctx_t *ctx,
PowerPCCPU *cpu = env_archcpu(env);
hwaddr hash;
target_ulong vsid, sr, pgidx;
- int target_page_bits;
bool pr, ds, nx;
/* First try to find a BAT entry if there are any */
@@ -338,7 +337,6 @@ static int mmu6xx_get_physical_address(CPUPPCState *env,
mmu_ctx_t *ctx,
ds = sr & SR32_T;
nx = sr & SR32_NX;
vsid = sr & SR32_VSID;
- target_page_bits = TARGET_PAGE_BITS;
qemu_log_mask(CPU_LOG_MMU,
"Check segment v=" TARGET_FMT_lx " %d " TARGET_FMT_lx
" nip=" TARGET_FMT_lx " lr=" TARGET_FMT_lx
@@ -347,7 +345,7 @@ static int mmu6xx_get_physical_address(CPUPPCState *env,
mmu_ctx_t *ctx,
(int)FIELD_EX64(env->msr, MSR, IR),
(int)FIELD_EX64(env->msr, MSR, DR), pr ? 1 : 0,
access_type == MMU_DATA_STORE, type);
- pgidx = (eaddr & ~SEGMENT_MASK_256M) >> target_page_bits;
+ pgidx = (eaddr & ~SEGMENT_MASK_256M) >> TARGET_PAGE_BITS;
hash = vsid ^ pgidx;
ctx->ptem = (vsid << 7) | (pgidx >> 10);
--
2.30.9
- [PATCH 09/43] target/ppc/mmu_common.c: Remove unused field from mmu_ctx_t, (continued)
- [PATCH 09/43] target/ppc/mmu_common.c: Remove unused field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 10/43] target/ppc/mmu_common.c: Remove hash field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 27/43] target/ppc/mmu_common.c: Remove mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 30/43] target/ppc: Unexport some functions from mmu-book3s-v3.h, BALATON Zoltan, 2024/05/26
- [PATCH 33/43] target/ppc: Remove single use static inline function, BALATON Zoltan, 2024/05/26
- [PATCH 11/43] target/ppc/mmu_common.c: Remove pte_update_flags(), BALATON Zoltan, 2024/05/26
- [PATCH 28/43] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_raddr(), BALATON Zoltan, 2024/05/26
- [PATCH 31/43] target/ppc/mmu-radix64: Remove externally unused parts from header, BALATON Zoltan, 2024/05/26
- [PATCH 34/43] target/ppc/internal.h: Consolidate ifndef CONFIG_USER_ONLY blocks, BALATON Zoltan, 2024/05/26
- [PATCH 12/43] target/ppc/mmu_common.c: Remove nx field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 14/43] target/ppc/mmu_common.c: Remove single use local variable,
BALATON Zoltan <=
- [PATCH 39/43] target/ppc: Change parameter type of some inline functions, BALATON Zoltan, 2024/05/26
- [PATCH 41/43] target/ppc: Change MMU xlate functions to take CPUState, BALATON Zoltan, 2024/05/26
- [PATCH 23/43] target/ppc/mmu_common.c: Rename function parameter, BALATON Zoltan, 2024/05/26
- [PATCH 22/43] target/ppc/mmu_common.c: Stop using ctx in ppc6xx_tlb_check(), BALATON Zoltan, 2024/05/26
- [PATCH 26/43] target/ppc/mmu_common.c: Stop using ctx in get_bat_6xx_tlb(), BALATON Zoltan, 2024/05/26
- [PATCH 25/43] target/ppc: Remove bat_size_prot(), BALATON Zoltan, 2024/05/26
- [PATCH 32/43] target/ppc: Remove includes from mmu-book3s-v3.h, BALATON Zoltan, 2024/05/26
- [PATCH 13/43] target/ppc/mmu_common.c: Convert local variable to bool, BALATON Zoltan, 2024/05/26
- [PATCH 43/43] target/ppc/mmu-hash32.c: Change parameter type of ppc_hash32_direct_store, BALATON Zoltan, 2024/05/26
- [PATCH 38/43] target/ppc/mmu-hash32.c: Use pte address as parameter instead of offset, BALATON Zoltan, 2024/05/26