aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/mmu-hash64.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2016-01-27 12:01:20 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2016-01-30 23:49:27 +1100
commit1114e712c998d6c6d888e8a22aab94e143ae3fd8 (patch)
tree3dbd651703d54b6f26135d1990c648b607c9d860 /target-ppc/mmu-hash64.h
parent61a36c9b5a12889994e6c45f4a175efcd63936db (diff)
target-ppc: Helper to determine page size information from hpte alone
h_enter() in the spapr code needs to know the page size of the HPTE it's about to insert. Unlike other paths that do this, it doesn't have access to the SLB, so at the moment it determines this with some open-coded tests which assume POWER7 or POWER8 page size encodings. To make this more flexible add ppc_hash64_hpte_page_shift_noslb() to determine both the "base" page size per segment, and the individual effective page size from an HPTE alone. This means that the spapr code should now be able to handle any page size listed in the env->sps table. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/mmu-hash64.h')
-rw-r--r--target-ppc/mmu-hash64.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/target-ppc/mmu-hash64.h b/target-ppc/mmu-hash64.h
index 293a9514db..34cf975484 100644
--- a/target-ppc/mmu-hash64.h
+++ b/target-ppc/mmu-hash64.h
@@ -16,6 +16,9 @@ void ppc_hash64_store_hpte(PowerPCCPU *cpu, target_ulong index,
void ppc_hash64_tlb_flush_hpte(PowerPCCPU *cpu,
target_ulong pte_index,
target_ulong pte0, target_ulong pte1);
+unsigned ppc_hash64_hpte_page_shift_noslb(PowerPCCPU *cpu,
+ uint64_t pte0, uint64_t pte1,
+ unsigned *seg_page_shift);
#endif
/*