We want to rework how set_pXd() behaves for generic compile-time folded page tables by disallowing its use and triggering a compile-time error when it is used improperly, ensuring that the actual first-level set_pXd() function is used instead.
As using set_pud() is invalid when __PGTABLE_PMD_FOLDED, pud_set_huge() is also invalid. Therefore, define it when __PGTABLE_PMD_FOLDED is not defined. There should be no functional change. Signed-off-by: Yeoreum Yun <[email protected]> --- arch/arm64/mm/mmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index f2be501468ce5..194b62c528de9 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1807,6 +1807,7 @@ void vmemmap_free(unsigned long start, unsigned long end, } #endif /* CONFIG_MEMORY_HOTPLUG */ +#ifndef __PAGETABLE_PMD_FOLDED int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) { pud_t new_pud = pfn_pud(__phys_to_pfn(phys), mk_pud_sect_prot(prot)); @@ -1820,6 +1821,7 @@ int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) set_pud(pudp, new_pud); return 1; } +#endif int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) { -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
