Skip to contentSkip to conversation

allow ioremapping top of memory

PATCH In review Philippe De Muyter 2 participants 2 messages Dec 6, 2009 – Dec 22, 2009 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 allow ioremapping top of memory

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.

arch/m68k/mm/kmap.c +1 -1
@@ -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
#1 lore raw
Quoted 2 lines · Philippe De Muyter

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.

Thanks, will take it.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds