[PATCH m68k resent] allow ioremapping top of memory

From: Philippe De Muyter
Date: Sun Dec 06 2009 - 14:29:19 EST


Hi Geert and all,

The test in __ioremap to reject memory ranges crossing the 0 boundary
rejects also memory ranges ending 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/