diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2013-03-12 00:31:09 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-03-22 15:28:47 +0100 |
commit | 0480884f1404295ba0d242791e036b05c4957bab (patch) | |
tree | ab601cf1a02c895765e552bf370a9b5a8ce15f2c /target-ppc/mmu-hash32.h | |
parent | c69b6151e7f242b02f261f321c392e5ef933176f (diff) | |
download | qemu-0480884f1404295ba0d242791e036b05c4957bab.tar.gz qemu-0480884f1404295ba0d242791e036b05c4957bab.tar.bz2 qemu-0480884f1404295ba0d242791e036b05c4957bab.zip |
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 <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/mmu-hash32.h')
-rw-r--r-- | target-ppc/mmu-hash32.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-ppc/mmu-hash32.h b/target-ppc/mmu-hash32.h index 6bf8f92463..6f9a0c2bf8 100644 --- a/target-ppc/mmu-hash32.h +++ b/target-ppc/mmu-hash32.h @@ -4,8 +4,8 @@ #ifndef CONFIG_USER_ONLY int pte32_is_valid(target_ulong pte0); -int find_pte32(CPUPPCState *env, mmu_ctx_t *ctx, int h, - int rw, int type, int target_page_bits); +int get_segment32(CPUPPCState *env, mmu_ctx_t *ctx, + target_ulong eaddr, int rw, int type); #endif /* CONFIG_USER_ONLY */ |