diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-04-26 13:14:52 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-04-26 13:14:52 +0100 |
commit | 924a158a12c7e732179dd85ddd20848039e7bd71 (patch) | |
tree | 312cf5182eb23f598fb3b8abff0b1220303bd10f /arch/arm/include | |
parent | 0c8454f56623505a99463405fd7d5664adfbb094 (diff) | |
download | op-kernel-dev-924a158a12c7e732179dd85ddd20848039e7bd71.zip op-kernel-dev-924a158a12c7e732179dd85ddd20848039e7bd71.tar.gz |
[ARM] Convert pmd_page() to be highmem safe
In the long run, we may want to place page tables in highmem. However,
pmd_page() has traditionally been coded to convert the physical address
to a virtual one, which won't work with highmem pages. Instead,
translate the physical address to a PFN, and then convert the PFN to a
struct page instead.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 110295c..1cd2d64 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -342,7 +342,7 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) return __va(ptr); } -#define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd))) +#define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd))) /* * Conversion functions: convert a page and protection to a page entry, |