aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/pgtable.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 67fc3d2b0aab..a0c35bf6cb92 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -476,12 +476,14 @@ static inline int pmd_present(pmd_t pmd)
476 */ 476 */
477static inline int pte_protnone(pte_t pte) 477static inline int pte_protnone(pte_t pte)
478{ 478{
479 return pte_flags(pte) & _PAGE_PROTNONE; 479 return (pte_flags(pte) & (_PAGE_PROTNONE | _PAGE_PRESENT))
480 == _PAGE_PROTNONE;
480} 481}
481 482
482static inline int pmd_protnone(pmd_t pmd) 483static inline int pmd_protnone(pmd_t pmd)
483{ 484{
484 return pmd_flags(pmd) & _PAGE_PROTNONE; 485 return (pmd_flags(pmd) & (_PAGE_PROTNONE | _PAGE_PRESENT))
486 == _PAGE_PROTNONE;
485} 487}
486#endif /* CONFIG_NUMA_BALANCING */ 488#endif /* CONFIG_NUMA_BALANCING */
487 489