We want to rework how pgd_page_vaddr() 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 pXd_pgtable() function is used instead.
For this, change usage of pgd_page_vaddr() to pud_pgtable() for the functions used when PGTABLE_LEVELS=3. There should be no functional change. Signed-off-by: Yeoreum Yun <[email protected]> --- arch/m68k/mm/init.c | 2 +- arch/m68k/mm/motorola.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index 3b88c0dd1616d..d8351c210f58d 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c @@ -95,7 +95,7 @@ static inline void init_pointer_tables(void) if (!pud_present(*pud)) continue; - pmd_dir = (pmd_t *)pgd_page_vaddr(kernel_pg_dir[i]); + pmd_dir = pud_pgtable(*pud); init_pointer_table(pmd_dir, TABLE_PMD); for (j = 0; j < PTRS_PER_PMD; j++) { diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index b30aa69a73a6a..03235d0618ef0 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -273,7 +273,7 @@ static pmd_t * __init kernel_ptr_table(void) if (!pud_present(*pud)) continue; - pmd = pgd_page_vaddr(kernel_pg_dir[i]); + pmd = (unsigned long)pud_pgtable(*pud); if (pmd > last) last = pmd; } -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
