diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2024-05-27 01:13:04 +0200 |
---|---|---|
committer | Nicholas Piggin <npiggin@gmail.com> | 2024-07-26 09:51:34 +1000 |
commit | 51993bef122896b29d1be218d536b6b3211cf2f1 (patch) | |
tree | 5d173af38bfaef491e3987d1c6ca8d8a39f7eb7d | |
parent | bfb5a5eee5cfbe9f248472f7489fed241a2dab21 (diff) | |
download | qemu-51993bef122896b29d1be218d536b6b3211cf2f1.zip qemu-51993bef122896b29d1be218d536b6b3211cf2f1.tar.gz qemu-51993bef122896b29d1be218d536b6b3211cf2f1.tar.bz2 |
target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_raddr()
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>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
-rw-r--r-- | target/ppc/mmu-hash32.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c index 6f0f0bb..c4de164 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; } |