From: Philippe De Muyter Date: Sun, 6 Dec 2009 19:28:41 +0000 (+0100) Subject: m68k: Allow ioremapping top of memory X-Git-Tag: v2.6.34-rc1~267^2~22 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=88cb773c5f8e45e48f3a89480610448974337cb0;p=karo-tx-linux.git m68k: Allow ioremapping top of memory 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 Signed-off-by: Geert Uytterhoeven --- diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c index df620ac2a296..cf93cdd515c5 100644 --- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c @@ -116,7 +116,7 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla /* * Don't allow mappings that wrap.. */ - if (!size || size > physaddr + size) + if (!size || physaddr > (unsigned long)(-size)) return NULL; #ifdef CONFIG_AMIGA