Skip to content

Commit

Permalink
[ARM] Convert pmd_page() to be highmem safe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Russell King committed Apr 26, 2009
1 parent 0c8454f commit 924a158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 924a158

Please sign in to comment.