]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/powerpc/mm/hugetlbpage.c
powerpc: Fix bad pmd error with book3E config
[linux-beck.git] / arch / powerpc / mm / hugetlbpage.c
index 237c8e5f2640b79dce83c4bce7f7f66ef09fe02f..77fdd2cef33b5a2c18ac40c442645d9dc38365ad 100644 (file)
@@ -592,8 +592,14 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
        do {
                pmd = pmd_offset(pud, addr);
                next = pmd_addr_end(addr, end);
-               if (pmd_none_or_clear_bad(pmd))
+               if (!is_hugepd(pmd)) {
+                       /*
+                        * if it is not hugepd pointer, we should already find
+                        * it cleared.
+                        */
+                       WARN_ON(!pmd_none_or_clear_bad(pmd));
                        continue;
+               }
 #ifdef CONFIG_PPC_FSL_BOOK3E
                /*
                 * Increment next by the size of the huge mapping since