diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> | 2018-09-20 23:39:43 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-03 15:39:58 +1000 |
commit | f1981b5b302f7f3b4c8b9b5e25ea8c48cebb1ae1 (patch) | |
tree | 4760438268ba749314c12e1640891a0eac917f5a /arch/powerpc/include | |
parent | powerpc/mm/book3s: Update pmd_present to look at _PAGE_PRESENT bit (diff) | |
download | linux-dev-f1981b5b302f7f3b4c8b9b5e25ea8c48cebb1ae1.tar.xz linux-dev-f1981b5b302f7f3b4c8b9b5e25ea8c48cebb1ae1.zip |
powerpc/mm/hugetlb/book3s: add _PAGE_PRESENT to hugepd pointer.
This make hugetlb directory pointer similar to other page able entries. A hugepd
entry is identified by lack of _PAGE_PTE bit set and directory size stored in
HUGEPD_SHIFT_MASK. We update that to also look at _PAGE_PRESENT
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/hash-4k.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/book3s/64/hugetlb.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/hash-4k.h b/arch/powerpc/include/asm/book3s/64/hash-4k.h index 9a3798660cef..15bc16b1dc9c 100644 --- a/arch/powerpc/include/asm/book3s/64/hash-4k.h +++ b/arch/powerpc/include/asm/book3s/64/hash-4k.h @@ -66,7 +66,7 @@ static inline int hash__hugepd_ok(hugepd_t hpd) * if it is not a pte and have hugepd shift mask * set, then it is a hugepd directory pointer */ - if (!(hpdval & _PAGE_PTE) && + if (!(hpdval & _PAGE_PTE) && (hpdval & _PAGE_PRESENT) && ((hpdval & HUGEPD_SHIFT_MASK) != 0)) return true; return false; diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h index 50888388a359..5b0177733994 100644 --- a/arch/powerpc/include/asm/book3s/64/hugetlb.h +++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h @@ -39,4 +39,7 @@ static inline bool gigantic_page_supported(void) } #endif +/* hugepd entry valid bit */ +#define HUGEPD_VAL_BITS (0x8000000000000000UL) + #endif |