[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 28/43] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_
From: |
BALATON Zoltan |
Subject: |
[PATCH 28/43] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_raddr() |
Date: |
Mon, 27 May 2024 01:13:04 +0200 (CEST) |
This function is used only once and does not add more clarity than
doing it inline.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
target/ppc/mmu-hash32.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c
index 6f0f0bbb00..c4de1647e2 100644
--- a/target/ppc/mmu-hash32.c
+++ b/target/ppc/mmu-hash32.c
@@ -298,15 +298,6 @@ static hwaddr ppc_hash32_htab_lookup(PowerPCCPU *cpu,
return pte_offset;
}
-static hwaddr ppc_hash32_pte_raddr(target_ulong sr, ppc_hash_pte32_t pte,
- target_ulong eaddr)
-{
- hwaddr rpn = pte.pte1 & HPTE32_R_RPN;
- hwaddr mask = ~TARGET_PAGE_MASK;
-
- return (rpn & ~mask) | (eaddr & mask);
-}
-
bool ppc_hash32_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type,
hwaddr *raddrp, int *psizep, int *protp, int mmu_idx,
bool guest_visible)
@@ -440,11 +431,12 @@ bool ppc_hash32_xlate(PowerPCCPU *cpu, vaddr eaddr,
MMUAccessType access_type,
*/
prot &= ~PAGE_WRITE;
}
- }
+ }
+ *protp = prot;
/* 9. Determine the real address from the PTE */
-
- *raddrp = ppc_hash32_pte_raddr(sr, pte, eaddr);
- *protp = prot;
+ *raddrp = pte.pte1 & HPTE32_R_RPN;
+ *raddrp &= TARGET_PAGE_MASK;
+ *raddrp |= eaddr & ~TARGET_PAGE_MASK;
return true;
}
--
2.30.9
- [PATCH 17/43] target/ppc/mmu_common.c: Remove ptem field from mmu_ctx_t, (continued)
- [PATCH 17/43] target/ppc/mmu_common.c: Remove ptem field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 21/43] target/ppc/mmu_common.c: Remove key field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 24/43] target/ppc/mmu_common.c: Use defines instead of numeric constants, BALATON Zoltan, 2024/05/26
- [PATCH 07/43] target/ppc/mmu_common.c: Return directly in ppc6xx_tlb_pte_check(), BALATON Zoltan, 2024/05/26
- [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 <=
- [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, 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