diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2016-02-23 13:36:17 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-02-29 20:34:34 +1100 |
commit | c61a8843124e353f4ba27c073133868da00e0335 (patch) | |
tree | 0454701b09a320be6186fcd4ed0447af3ee2b4ee /arch/powerpc/mm | |
parent | f1a9ae034a263d93ea408825afe699aebf37010a (diff) | |
download | linux-c61a8843124e353f4ba27c073133868da00e0335.tar.gz linux-c61a8843124e353f4ba27c073133868da00e0335.tar.bz2 linux-c61a8843124e353f4ba27c073133868da00e0335.zip |
powerpc/mm/book3s-64: Use physical addresses in upper page table tree levels
This changes the Linux page tables to store physical addresses
rather than kernel virtual addresses in the upper levels of the
tree (pgd, pud and pmd) for 64-bit Book 3S machines.
This also changes the hugepd pointers used to implement hugepages
when the base page size is 4k to store physical addresses rather than
virtual addresses (again just for 64-bit Book3S machines).
This frees up some high order bits, and will be needed with
PowerISA v3.0 machines which read the page table tree in hardware
in radix mode.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 744e24bcb85c..6dd272b6196f 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -107,8 +107,7 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, kmem_cache_free(cachep, new); else { #ifdef CONFIG_PPC_BOOK3S_64 - hpdp->pd = (unsigned long)new | - (shift_to_mmu_psize(pshift) << 2); + hpdp->pd = __pa(new) | (shift_to_mmu_psize(pshift) << 2); #else hpdp->pd = ((unsigned long)new & ~PD_HUGE) | pshift; #endif |