aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/mm/mmu.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index ef82312860ac..37a902cad918 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -955,13 +955,18 @@ void *__init fixmap_remap_fdt(phys_addr_t dt_phys)
955 955
956int __init arch_ioremap_pud_supported(void) 956int __init arch_ioremap_pud_supported(void)
957{ 957{
958 /* only 4k granule supports level 1 block mappings */ 958 /*
959 return IS_ENABLED(CONFIG_ARM64_4K_PAGES); 959 * Only 4k granule supports level 1 block mappings.
960 * SW table walks can't handle removal of intermediate entries.
961 */
962 return IS_ENABLED(CONFIG_ARM64_4K_PAGES) &&
963 !IS_ENABLED(CONFIG_ARM64_PTDUMP_DEBUGFS);
960} 964}
961 965
962int __init arch_ioremap_pmd_supported(void) 966int __init arch_ioremap_pmd_supported(void)
963{ 967{
964 return 1; 968 /* See arch_ioremap_pud_supported() */
969 return !IS_ENABLED(CONFIG_ARM64_PTDUMP_DEBUGFS);
965} 970}
966 971
967int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) 972int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot)