aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2013-06-20 05:00:18 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-06-21 02:01:54 -0400
commit12bc9f6fc1d6582b4529ac522d2231bd2584a5f1 (patch)
tree40be8749c9b19e0e9dfddeee54436271dce2bb2f /arch/powerpc/include
parentac52ae4721233150a3c30e9732a1c1f4f68e7db7 (diff)
powerpc: Replace find_linux_pte with find_linux_pte_or_hugepte
Replace find_linux_pte with find_linux_pte_or_hugepte and explicitly document why we don't need to handle transparent hugepages at callsites. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc64.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
index 6c9323f3ab54..e71bd25d62d7 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -344,30 +344,6 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry)
344 344
345void pgtable_cache_add(unsigned shift, void (*ctor)(void *)); 345void pgtable_cache_add(unsigned shift, void (*ctor)(void *));
346void pgtable_cache_init(void); 346void pgtable_cache_init(void);
347
348/*
349 * find_linux_pte returns the address of a linux pte for a given
350 * effective address and directory. If not found, it returns zero.
351 */
352static inline pte_t *find_linux_pte(pgd_t *pgdir, unsigned long ea)
353{
354 pgd_t *pg;
355 pud_t *pu;
356 pmd_t *pm;
357 pte_t *pt = NULL;
358
359 pg = pgdir + pgd_index(ea);
360 if (!pgd_none(*pg)) {
361 pu = pud_offset(pg, ea);
362 if (!pud_none(*pu)) {
363 pm = pmd_offset(pu, ea);
364 if (pmd_present(*pm))
365 pt = pte_offset_kernel(pm, ea);
366 }
367 }
368 return pt;
369}
370
371#endif /* __ASSEMBLY__ */ 347#endif /* __ASSEMBLY__ */
372 348
373/* 349/*