[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 43/43] target/ppc/mmu-hash32.c: Change parameter type of ppc_hash
|
From: |
BALATON Zoltan |
|
Subject: |
[PATCH 43/43] target/ppc/mmu-hash32.c: Change parameter type of ppc_hash32_direct_store |
|
Date: |
Mon, 27 May 2024 01:13:20 +0200 (CEST) |
This function needs CPUState and env but takes PowerPCCPU and cast
that. We already have the right types in the caller so pass them to
this function to avoid casting.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
target/ppc/mmu-hash32.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c
index 0f9c61bf89..3588f8f8de 100644
--- a/target/ppc/mmu-hash32.c
+++ b/target/ppc/mmu-hash32.c
@@ -109,15 +109,12 @@ static hwaddr ppc_hash32_bat_lookup(CPUPPCState *env,
target_ulong ea,
return -1;
}
-static bool ppc_hash32_direct_store(PowerPCCPU *cpu, target_ulong sr,
- target_ulong eaddr,
+static bool ppc_hash32_direct_store(CPUState *cs, CPUPPCState *env,
+ target_ulong sr, target_ulong eaddr,
MMUAccessType access_type,
hwaddr *raddr, int *prot, int mmu_idx,
bool guest_visible)
{
- CPUState *cs = CPU(cpu);
- CPUPPCState *env = &cpu->env;
-
qemu_log_mask(CPU_LOG_MMU, "direct store...\n");
if (access_type == MMU_INST_FETCH) {
@@ -336,7 +333,7 @@ bool ppc_hash32_xlate(CPUState *cs, vaddr eaddr,
MMUAccessType access_type,
/* 4. Handle direct store segments */
if (sr & SR32_T) {
- return ppc_hash32_direct_store(cpu, sr, eaddr, access_type,
+ return ppc_hash32_direct_store(cs, env, sr, eaddr, access_type,
raddrp, protp, mmu_idx, guest_visible);
}
--
2.30.9
- [PATCH 12/43] target/ppc/mmu_common.c: Remove nx field from mmu_ctx_t, (continued)
- [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, 2024/05/26
- [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 <=
- [PATCH 38/43] target/ppc/mmu-hash32.c: Use pte address as parameter instead of offset, BALATON Zoltan, 2024/05/26
- [PATCH 42/43] target/ppc/mmu-hash32.c: Change parameter type of ppc_hash32_set_[rc], BALATON Zoltan, 2024/05/26
- [PATCH 37/43] target/ppc/mmu-hash32.c: Return and use pte address instead of base + offset, BALATON Zoltan, 2024/05/26
- [PATCH 19/43] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_prot(), BALATON Zoltan, 2024/05/26
- [PATCH 40/43] target/ppc: Change parameter type of ppc64_v3_radix(), BALATON Zoltan, 2024/05/26
- [PATCH 36/43] target/ppc/mmu-hash32: Remove some static inlines from header, BALATON Zoltan, 2024/05/26
- [PATCH 29/43] target/ppc/mmu-hash32.c: Move get_pteg_offset32() to the header, BALATON Zoltan, 2024/05/26
- [PATCH 35/43] target/ppc/mmu-hash32.c: Change parameter type of ppc_hash32_bat_lookup(), BALATON Zoltan, 2024/05/26
- Re: [PATCH 00/43] Remaining MMU clean up patches, BALATON Zoltan, 2024/05/27