summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/hugetlb.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2016-02-23 03:36:17 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2016-02-29 10:34:34 +0100
commitc61a8843124e353f4ba27c073133868da00e0335 (patch)
tree0454701b09a320be6186fcd4ed0447af3ee2b4ee /arch/powerpc/include/asm/hugetlb.h
parentpowerpc/mm/book3s-64: Free up 7 high-order bits in the Linux PTE (diff)
downloadlinux-c61a8843124e353f4ba27c073133868da00e0335.tar.xz
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/include/asm/hugetlb.h')
-rw-r--r--arch/powerpc/include/asm/hugetlb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h
index 7eac89b9f02e..42814f0567cc 100644
--- a/arch/powerpc/include/asm/hugetlb.h
+++ b/arch/powerpc/include/asm/hugetlb.h
@@ -19,7 +19,7 @@ static inline pte_t *hugepd_page(hugepd_t hpd)
* We have only four bits to encode, MMU page size
*/
BUILD_BUG_ON((MMU_PAGE_COUNT - 1) > 0xf);
- return (pte_t *)(hpd.pd & ~HUGEPD_SHIFT_MASK);
+ return __va(hpd.pd & HUGEPD_ADDR_MASK);
}
static inline unsigned int hugepd_mmu_psize(hugepd_t hpd)