aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2015-03-30 01:09:13 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2015-04-16 21:23:24 -0400
commitdac5657067919161eb3273ca787d8ae9814801e7 (patch)
tree41a7828ae4d40d6391fc409f5c48ee9a60720a71 /arch/powerpc/include
parent5e1d44aef1673b504dde475aa714b1bdb9b875c4 (diff)
KVM: PPC: Remove page table walk helpers
This patch remove helpers which we had used only once in the code. Limiting page table walk variants help in ensuring that we won't end up with code walking page table with wrong assumptions. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/pgtable.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 9835ac4173b7..92fe01c355a9 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -249,27 +249,6 @@ extern int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr,
249#endif 249#endif
250pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea, 250pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
251 unsigned *shift); 251 unsigned *shift);
252
253static inline pte_t *lookup_linux_ptep(pgd_t *pgdir, unsigned long hva,
254 unsigned long *pte_sizep)
255{
256 pte_t *ptep;
257 unsigned long ps = *pte_sizep;
258 unsigned int shift;
259
260 ptep = find_linux_pte_or_hugepte(pgdir, hva, &shift);
261 if (!ptep)
262 return NULL;
263 if (shift)
264 *pte_sizep = 1ul << shift;
265 else
266 *pte_sizep = PAGE_SIZE;
267
268 if (ps > *pte_sizep)
269 return NULL;
270
271 return ptep;
272}
273#endif /* __ASSEMBLY__ */ 252#endif /* __ASSEMBLY__ */
274 253
275#endif /* __KERNEL__ */ 254#endif /* __KERNEL__ */