From 0480884f1404295ba0d242791e036b05c4957bab Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 12 Mar 2013 00:31:09 +0000 Subject: target-ppc: Disentangle get_segment() The poorly named get_segment() function handles most of the address translation logic for hash-based MMUs. It has many ugly conditionals on whether the MMU is 32-bit or 64-bit. This patch splits the function into 32 and 64-bit versions, using the switch on mmu_type that's already in the caller (get_physical_address()) to select the right one. Most of the original function remains in mmu_helper.c to support the 6xx software loaded TLB implementations (cleaning those up is a project for another day). Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- target-ppc/mmu-hash64.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'target-ppc/mmu-hash64.h') diff --git a/target-ppc/mmu-hash64.h b/target-ppc/mmu-hash64.h index 7b9713d..690c1d8 100644 --- a/target-ppc/mmu-hash64.h +++ b/target-ppc/mmu-hash64.h @@ -4,11 +4,10 @@ #ifndef CONFIG_USER_ONLY #ifdef TARGET_PPC64 -ppc_slb_t *slb_lookup(CPUPPCState *env, target_ulong eaddr); void dump_slb(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env); int ppc_store_slb (CPUPPCState *env, target_ulong rb, target_ulong rs); -int find_pte64(CPUPPCState *env, mmu_ctx_t *ctx, int h, - int rw, int type, int target_page_bits); +int get_segment64(CPUPPCState *env, mmu_ctx_t *ctx, + target_ulong eaddr, int rw, int type); #endif #endif /* CONFIG_USER_ONLY */ -- cgit v1.1