mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
mm: stop using pxd_ERROR()
pxd_ERROR() has been used in generic mm just to print the page table entry in pxd_clear_bad() before clearing those out with pxd_clear() later. These pxd_ERROR() macros have been provided by all platforms which basically did the same thing. Make pxd_clear_bad() use recently added ptval_to_str() instead for printing page table entries thus completely dropping dependency on platform provided pxd_ERROR() macros which can then be dropped off later on. Link: https://lore.kernel.org/20260831054331.625505-3-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Helge Deller <deller@gmx.de> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: James Bottomley <james.bottomley@HansenPartnership.com> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Rich Felker <dalias@libc.org> Cc: Samuel Holland <samuel.holland@sifive.com> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
This commit is contained in:
parent
fbcdf5b52f
commit
0666fc9d44
|
|
@ -26,14 +26,20 @@
|
|||
|
||||
void pgd_clear_bad(pgd_t *pgd)
|
||||
{
|
||||
pgd_ERROR(*pgd);
|
||||
char str[PTVAL_STR_MAX];
|
||||
|
||||
ptval_to_str(str, pgd_val(*pgd));
|
||||
pr_err("bad pgd %s.\n", str);
|
||||
pgd_clear(pgd);
|
||||
}
|
||||
|
||||
#ifndef __PAGETABLE_P4D_FOLDED
|
||||
void p4d_clear_bad(p4d_t *p4d)
|
||||
{
|
||||
p4d_ERROR(*p4d);
|
||||
char str[PTVAL_STR_MAX];
|
||||
|
||||
ptval_to_str(str, p4d_val(*p4d));
|
||||
pr_err("bad p4d %s.\n", str);
|
||||
p4d_clear(p4d);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -41,7 +47,10 @@ void p4d_clear_bad(p4d_t *p4d)
|
|||
#ifndef __PAGETABLE_PUD_FOLDED
|
||||
void pud_clear_bad(pud_t *pud)
|
||||
{
|
||||
pud_ERROR(*pud);
|
||||
char str[PTVAL_STR_MAX];
|
||||
|
||||
ptval_to_str(str, pud_val(*pud));
|
||||
pr_err("bad pud %s.\n", str);
|
||||
pud_clear(pud);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -53,7 +62,10 @@ void pud_clear_bad(pud_t *pud)
|
|||
*/
|
||||
void pmd_clear_bad(pmd_t *pmd)
|
||||
{
|
||||
pmd_ERROR(*pmd);
|
||||
char str[PTVAL_STR_MAX];
|
||||
|
||||
ptval_to_str(str, pmd_val(*pmd));
|
||||
pr_err("bad pmd %s.\n", str);
|
||||
pmd_clear(pmd);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user