X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=mm%2Fpgtable-generic.c;h=3929a40bd6c0a6d618d0dc0136fe6aecaad08628;hb=25724841dfaed05f23a3ddaaaed5c9b61ceea7bd;hp=e1a6e4fab016200e94ec2c9e96b1c7f88281ed22;hpb=6bd2cab2c1fd0616b28bb567543f53b624bf885a;p=~andy%2Flinux diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c index e1a6e4fab01..3929a40bd6c 100644 --- a/mm/pgtable-generic.c +++ b/mm/pgtable-generic.c @@ -10,6 +10,30 @@ #include #include +/* + * If a p?d_bad entry is found while walking page tables, report + * the error, before resetting entry to p?d_none. Usually (but + * very seldom) called out from the p?d_none_or_clear_bad macros. + */ + +void pgd_clear_bad(pgd_t *pgd) +{ + pgd_ERROR(*pgd); + pgd_clear(pgd); +} + +void pud_clear_bad(pud_t *pud) +{ + pud_ERROR(*pud); + pud_clear(pud); +} + +void pmd_clear_bad(pmd_t *pmd) +{ + pmd_ERROR(*pmd); + pmd_clear(pmd); +} + #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS /* * Only sets the access flags (dirty, accessed), as well as write