mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
powerpc/ppc32: Fixup pmd_page to work when ARCH_PFN_OFFSET is non-zero
Instead of referencing mem_map directly, use pfn_to_page. Otherwise the kernel crashes when trying to start userspace if ARCH_PFN_OFFSET is non-zero and CONFIG_BOOKE is not defined Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
6fe9d1facb
commit
43b5fefc24
1 changed files with 1 additions and 1 deletions
|
@ -287,7 +287,7 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry)
|
|||
#define pmd_page_vaddr(pmd) \
|
||||
((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
|
||||
#define pmd_page(pmd) \
|
||||
(mem_map + (pmd_val(pmd) >> PAGE_SHIFT))
|
||||
pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
|
||||
#else
|
||||
#define pmd_page_vaddr(pmd) \
|
||||
((unsigned long) (pmd_val(pmd) & PAGE_MASK))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue