From 63a0caecc967d9e12b4b4ed2a97aba8be23455c2 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 25 Jan 2023 11:35:25 +0000 Subject: [PATCH] Revert "ANDROID: arm64: Register earlycon fixmap with the MMIO guard" Reason for revert: MMIO guard is initialised too late for earlycon, so the fixup is a waste of time. Signed-off-by: Keir Fraser Bug: 259645922 Change-Id: Iace214f7140baf073cfa5cef1ee65fca9e4a76d0 --- arch/arm64/mm/ioremap.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c index 0d05e91491a2..060c5786f5cb 100644 --- a/arch/arm64/mm/ioremap.c +++ b/arch/arm64/mm/ioremap.c @@ -70,17 +70,6 @@ static int __init ioremap_guard_setup(char *str) } early_param("ioremap_guard", ioremap_guard_setup); -static void fixup_fixmap(void) -{ - pte_t *ptep = __get_fixmap_pte(FIX_EARLYCON_MEM_BASE); - - if (!ptep) - return; - - ioremap_phys_range_hook(__pte_to_phys(*ptep), PAGE_SIZE, - __pgprot(pte_val(*ptep) & PTE_ATTRINDX_MASK)); -} - void kvm_init_ioremap_services(void) { struct arm_smccc_res res; @@ -111,7 +100,6 @@ void kvm_init_ioremap_services(void) if (res.a0 == SMCCC_RET_SUCCESS) { guard_granule = granule; static_branch_enable(&ioremap_guard_key); - fixup_fixmap(); pr_info("Using KVM MMIO guard for ioremap\n"); } else { pr_warn("KVM MMIO guard registration failed (%ld)\n", res.a0);