diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-07-04 06:22:27 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 15:07:41 -0500 |
commit | 0d31fe47b0f62e6546779eae2fc9b2e024aff4ce (patch) | |
tree | 6e1a619868e7e8bde6180d73c75ea7ab6f131e9b /arch/arm/mm/mm.h | |
parent | 67ece1443174d852e71c42facb3e2d7dd338c88a (diff) |
ARM: pgtable: provide get_top_pte() to complement set_top_pte()
Provide get_top_pte() to complement set_top_pte(), moving the only
users of TOP_PTE to arch/arm/mm/mm.h.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/mm.h')
-rw-r--r-- | arch/arm/mm/mm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index a4e7febeb6a1..1651d5aa04a6 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -24,6 +24,11 @@ static inline void set_top_pte(unsigned long va, pte_t pte) | |||
24 | local_flush_tlb_kernel_page(va); | 24 | local_flush_tlb_kernel_page(va); |
25 | } | 25 | } |
26 | 26 | ||
27 | static inline pte_t get_top_pte(unsigned long va) | ||
28 | { | ||
29 | return *TOP_PTE(va); | ||
30 | } | ||
31 | |||
27 | static inline pmd_t *pmd_off_k(unsigned long virt) | 32 | static inline pmd_t *pmd_off_k(unsigned long virt) |
28 | { | 33 | { |
29 | return pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt); | 34 | return pmd_offset(pud_offset(pgd_offset_k(virt), virt), virt); |