From a5c446a989bbb4d6efd493f11e09ec3a3560887f Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Sat, 18 Dec 2021 13:39:36 +0100 Subject: [PATCH] Revert "arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM" This reverts commit 8dd559d53b3b2de960ca1ec1359f5a9b4a12e181. --- arch/arm/mm/ioremap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 80fb5a4a5c05..000e8210000b 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -285,8 +284,7 @@ static void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, * Don't allow RAM to be mapped with mismatched attributes - this * causes problems with ARMv6+ */ - if (WARN_ON(memblock_is_map_memory(PFN_PHYS(pfn)) && - mtype != MT_MEMORY_RW)) + if (WARN_ON(pfn_valid(pfn) && mtype != MT_MEMORY_RW)) return NULL; area = get_vm_area_caller(size, VM_IOREMAP, caller); -- 2.25.1