Skip to content

Commit cb67ea1

Browse files
Ryan Robertswilldeacon
authored andcommitted
arm64/mm: Fix pud_user_accessible_page() for PGTABLE_LEVELS <= 2
The recent change to use pud_valid() as part of the implementation of pud_user_accessible_page() fails to build when PGTABLE_LEVELS <= 2 because pud_valid() is not defined in that case. Fix this by defining pud_valid() to false for this case. This means that pud_user_accessible_page() will correctly always return false for this config. Fixes: f0f5863 ("arm64/mm: Remove PTE_PROT_NONE bit") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Ryan Roberts <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 5b32510 commit cb67ea1

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
@@ -814,6 +814,7 @@ static inline pmd_t *pud_pgtable(pud_t pud)
814814

815815
#else
816816

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

0 commit comments

Comments
 (0)