[PATCH] m68k allow ioremapping top of memory

From: Philippe De Muyter
Date: Thu Oct 22 2009 - 09:55:07 EST


Hi all,

The test in __ioremap to reject memory ranges crossing the 0 boundary
rejects also memory ranges at the end of the memory. Fix that.

Signed-off-by: Philippe De Muyter <phdm@xxxxxxxxx>

diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -116,7 +115,7 @@ void __iomem *__ioremap(unsigned long ph
/*
* Don't allow mappings that wrap..
*/
- if (!size || size > physaddr + size)
+ if (!size || physaddr > (unsigned long)(-size))
return NULL;

#ifdef CONFIG_AMIGA
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/