[PATCH v2] ARM: allow, but warn, when issuing ioremap() on RAM

Felipe Contreras felipe.contreras at gmail.com
Thu Oct 7 08:29:09 EDT 2010

Many drivers are broken, and there's no alternative in sight. Such a big
change should stay as a warning for now, and only later should it
actually fail.

The drivers are not doing something correct, we get it, but for now it's
better to allow them to work (they do 99% of the time anyway) rather
than to force everyone to revert this patch in their internal trees
until there's a solution. A slightly broken functionality is better than
no functionality at all.

A warning lets people know that what they are doing is not right, and
they should fix it.

Cc: Han Jonghun <jonghun79.han at gmail.com>
Cc: Hemant Pedanekar <hemantp at ti.com>
Cc: Arnd Hannemann <arnd at arndnet.de>
Cc: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
Cc: Omar Ramirez Luna <omar.ramirez at ti.com>
Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>
 arch/arm/mm/ioremap.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

For issues related to this:

diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index ab50627..a168673 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -202,10 +202,9 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
 		return NULL;
-	 * Don't allow RAM to be mapped - this causes problems with ARMv6+
+	 * This causes problems with ARMv6+. Will be disallowed soon.
-	if (WARN_ON(pfn_valid(pfn)))
-		return NULL;
+	WARN_ON(pfn_valid(pfn));
 	type = get_mem_type(mtype);
 	if (!type)

More information about the linux-arm-kernel mailing list