diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-12-05 17:30:54 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-12-05 17:30:54 +0100 |
commit | e9f2d6d66037cdf97487491e04053f411abc5d16 (patch) | |
tree | 123cec080d17fb74a2531d8cc7ad1cf44bbad9ec /arch/arm/mm/highmem.c | |
parent | Merge branches 'fixes', 'misc', 'pm' and 'sa1100' into for-next (diff) | |
parent | Merge tag 'ronx-next' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/l... (diff) | |
download | linux-e9f2d6d66037cdf97487491e04053f411abc5d16.tar.xz linux-e9f2d6d66037cdf97487491e04053f411abc5d16.zip |
Merge branch 'devel-stable' into for-next
Diffstat (limited to 'arch/arm/mm/highmem.c')
-rw-r--r-- | arch/arm/mm/highmem.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c index e17ed00828d7..b98895d9fe57 100644 --- a/arch/arm/mm/highmem.c +++ b/arch/arm/mm/highmem.c @@ -18,19 +18,20 @@ #include <asm/tlbflush.h> #include "mm.h" -pte_t *fixmap_page_table; - static inline void set_fixmap_pte(int idx, pte_t pte) { unsigned long vaddr = __fix_to_virt(idx); - set_pte_ext(fixmap_page_table + idx, pte, 0); + pte_t *ptep = pte_offset_kernel(pmd_off_k(vaddr), vaddr); + + set_pte_ext(ptep, pte, 0); local_flush_tlb_kernel_page(vaddr); } static inline pte_t get_fixmap_pte(unsigned long vaddr) { - unsigned long idx = __virt_to_fix(vaddr); - return *(fixmap_page_table + idx); + pte_t *ptep = pte_offset_kernel(pmd_off_k(vaddr), vaddr); + + return *ptep; } void *kmap(struct page *page) @@ -84,7 +85,7 @@ void *kmap_atomic(struct page *page) * With debugging enabled, kunmap_atomic forces that entry to 0. * Make sure it was indeed properly unmapped. */ - BUG_ON(!pte_none(*(fixmap_page_table + idx))); + BUG_ON(!pte_none(get_fixmap_pte(vaddr))); #endif /* * When debugging is off, kunmap_atomic leaves the previous mapping @@ -137,7 +138,7 @@ void *kmap_atomic_pfn(unsigned long pfn) idx = type + KM_TYPE_NR * smp_processor_id(); vaddr = __fix_to_virt(idx); #ifdef CONFIG_DEBUG_HIGHMEM - BUG_ON(!pte_none(*(fixmap_page_table + idx))); + BUG_ON(!pte_none(get_fixmap_pte(vaddr))); #endif set_fixmap_pte(idx, pfn_pte(pfn, kmap_prot)); |