public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH] m68k allow ioremapping top of memory
@ 2009-10-22 13:54 Philippe De Muyter
  0 siblings, 0 replies; only message in thread
From: Philippe De Muyter @ 2009-10-22 13:54 UTC (permalink / raw)
  To: linux-kernel, linux-m68k

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@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] only message in thread

only message in thread, other threads:[~2009-10-22 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22 13:54 [PATCH] m68k allow ioremapping top of memory Philippe De Muyter

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