asm-generic/mm: stub out p{4,u}d_clear_bad() if __PAGETABLE_P{4,U}D_FOLDED
[linux-2.6-block.git] / mm / pgtable-generic.c
index 532c29276fcee0e4beb3f62ed977c9319dc4296d..3d7c01e76efc33dafe863d4c2bb5e265c1486a2b 100644 (file)
@@ -24,18 +24,27 @@ void pgd_clear_bad(pgd_t *pgd)
        pgd_clear(pgd);
 }
 
+#ifndef __PAGETABLE_P4D_FOLDED
 void p4d_clear_bad(p4d_t *p4d)
 {
        p4d_ERROR(*p4d);
        p4d_clear(p4d);
 }
+#endif
 
+#ifndef __PAGETABLE_PUD_FOLDED
 void pud_clear_bad(pud_t *pud)
 {
        pud_ERROR(*pud);
        pud_clear(pud);
 }
+#endif
 
+/*
+ * Note that the pmd variant below can't be stub'ed out just as for p4d/pud
+ * above. pmd folding is special and typically pmd_* macros refer to upper
+ * level even when folded
+ */
 void pmd_clear_bad(pmd_t *pmd)
 {
        pmd_ERROR(*pmd);