powerpc/mm/hugetlb/book3s: add _PAGE_PRESENT to hugepd pointer.
[linux-2.6-block.git] / arch / powerpc / include / asm / book3s / 64 / hash-4k.h
index 9a3798660cefa34a47a1466c03e0aaf21d495749..15bc16b1dc9cf7e90097bfdaea73c9963e2c5a9d 100644 (file)
@@ -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;