aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>2018-09-20 23:39:46 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-03 15:40:00 +1000
commit8890e03380d361f67fdd7f91758d93339fd66ca9 (patch)
treee4d08bd50f0cc52538837ece8c9a9b53bcc59e31 /arch/powerpc/include/asm/book3s/64/pgtable-64k.h
parentarch/powerpc/mm/hash: validate the pte entries before handling the hash fault (diff)
downloadwireguard-linux-8890e03380d361f67fdd7f91758d93339fd66ca9.tar.xz
wireguard-linux-8890e03380d361f67fdd7f91758d93339fd66ca9.zip
powerpc/mm/thp: update pmd_trans_huge to check for pmd_present
We need to make sure pmd_trans_huge returns false for a pmd migration entry. We mark the migration entry by clearing the _PAGE_PRESENT bit. We keep the _PAGE_PTE bit set to indicate a leaf page table entry. Hence we need to make sure we check for pmd_present() so that pmd_trans_huge won't return true on pmd migration entry. 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/asm/book3s/64/pgtable-64k.h')
-rw-r--r--arch/powerpc/include/asm/book3s/64/pgtable-64k.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable-64k.h b/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
index d7ee249d6890..e3d4dd4ae2fa 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
@@ -10,6 +10,9 @@
*
* Defined in such a way that we can optimize away code block at build time
* if CONFIG_HUGETLB_PAGE=n.
+ *
+ * returns true for pmd migration entries, THP, devmap, hugetlb
+ * But compile time dependent on CONFIG_HUGETLB_PAGE
*/
static inline int pmd_huge(pmd_t pmd)
{