[PATCH] Fixup for "mm: Remove pud_user() from asm-generic/pgtable-nopmd.h"

From: Christophe Leroy
Date: Thu Jul 11 2024 - 08:00:15 EST


A stub pud_user() is also required for ARM64 after commit ed928a3402d8 ("arm64/mm: fix page table check compile error for CONFIG_PGTABLE_LEVELS=2")

Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Foe-kbuild-all%2F202407111706.tTA6kPdD-lkp%40intel.com%2F&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C7caf923d5d4a4ca5600708dca18a1c35%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C638562861750514044%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=0BzPf75jJH9ok%2Bg69kthE24pZHTSoKfGBzpZEA2U91M%3D&reserved=0
---
arch/arm64/include/asm/pgtable.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index f8efbc128446..c818b3328704 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -812,6 +812,7 @@ static inline pmd_t *pud_pgtable(pud_t pud)

#define pud_valid(pud) false
#define pud_page_paddr(pud) ({ BUILD_BUG(); 0; })
+#define pud_user false /* Always 0 with folding */
#define pud_user_exec(pud) pud_user(pud) /* Always 0 with folding */

/* Match pmd_offset folding in <asm/generic/pgtable-nopmd.h> */
--
2.44.0