Skip to content

Commit

Permalink
m68k: Allow ioremapping top of memory
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
  • Loading branch information
Philippe De Muyter authored and Geert Uytterhoeven committed Feb 27, 2010
1 parent 1454526 commit 88cb773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/m68k/mm/kmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 88cb773

Please sign in to comment.