Skip to content

Commit 4e4ff23

Browse files
committed
arm64/mm: Define dummy pud_user_exec() when using 2-level page-table
With only two levels of page-table, the generic 'pud_*' macros are implemented using dummy operations in pgtable-nopmd.h. Since commit 730a11f ("arm64/mm: add pud_user_exec() check in pud_user_accessible_page()"), pud_user_accessible_page() unconditionally calls pud_user_exec(), which is an arm64-specific helper and therefore isn't defined by pgtable-nopmd.h. This results in a build failure for configurations with only two levels of page table: arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page': >> arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration] 870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud)); | ^~~~~~~~~~~~~ | pmd_user_exec Fix the problem by defining pud_user_exec() as pud_user() in this case. Link: https://lore.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 5db568e commit 4e4ff23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,7 @@ static inline pmd_t *pud_pgtable(pud_t pud)
730730
#else
731731

732732
#define pud_page_paddr(pud) ({ BUILD_BUG(); 0; })
733+
#define pud_user_exec(pud) pud_user(pud) /* Always 0 with folding */
733734

734735
/* Match pmd_offset folding in <asm/generic/pgtable-nopmd.h> */
735736
#define pmd_set_fixmap(addr) NULL

0 commit comments

Comments
 (0)