diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-07-04 06:25:53 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 15:07:59 -0500 |
commit | 60db4fcf14c6b562399579473a67e51eed694ff4 (patch) | |
tree | 82edc5508e8720ba51419f120494f511405e66ac /arch | |
parent | 0d31fe47b0f62e6546779eae2fc9b2e024aff4ce (diff) |
ARM: pgtable: get rid of TOP_PTE()
Get rid of the TOP_PTE() macro as we now have proper accessor functions
instead. No one should be directly referencing the top pte table
anymore.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/mm.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index 1651d5aa04a6..27f4a619b35d 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -3,8 +3,6 @@ | |||
3 | /* the upper-most page table pointer */ | 3 | /* the upper-most page table pointer */ |
4 | extern pmd_t *top_pmd; | 4 | extern pmd_t *top_pmd; |
5 | 5 | ||
6 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) | ||
7 | |||
8 | /* | 6 | /* |
9 | * 0xffff8000 to 0xffffffff is reserved for any ARM architecture | 7 | * 0xffff8000 to 0xffffffff is reserved for any ARM architecture |
10 | * specific hacks for copying pages efficiently, while 0xffff4000 | 8 | * specific hacks for copying pages efficiently, while 0xffff4000 |
@@ -20,13 +18,15 @@ extern pmd_t *top_pmd; | |||
20 | 18 | ||
21 | static inline void set_top_pte(unsigned long va, pte_t pte) | 19 | static inline void set_top_pte(unsigned long va, pte_t pte) |
22 | { | 20 | { |
23 | set_pte_ext(TOP_PTE(va), pte, 0); | 21 | pte_t *ptep = pte_offset_kernel(top_pmd, va); |
22 | set_pte_ext(ptep, pte, 0); | ||
24 | local_flush_tlb_kernel_page(va); | 23 | local_flush_tlb_kernel_page(va); |
25 | } | 24 | } |
26 | 25 | ||
27 | static inline pte_t get_top_pte(unsigned long va) | 26 | static inline pte_t get_top_pte(unsigned long va) |
28 | { | 27 | { |
29 | return *TOP_PTE(va); | 28 | pte_t *ptep = pte_offset_kernel(top_pmd, va); |
29 | return *ptep; | ||
30 | } | 30 | } |
31 | 31 | ||
32 | static inline pmd_t *pmd_off_k(unsigned long virt) | 32 | static inline pmd_t *pmd_off_k(unsigned long virt) |