aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pgtable-ppc64.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/pgtable-ppc64.h')
-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/*