public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH m68k resent] allow ioremapping top of memory
@ 2009-12-06 19:28 Philippe De Muyter
  2009-12-22 19:08 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe De Muyter @ 2009-12-06 19:28 UTC (permalink / raw)
  To: linux-kernel, linux-m68k

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@macqel.be>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-22 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-06 19:28 [PATCH m68k resent] allow ioremapping top of memory Philippe De Muyter
2009-12-22 19:08 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox