Commit a292dfa0 authored by Florian Zumbiehl's avatar Florian Zumbiehl Committed by Linus Torvalds

parisc: fix wrong page aligned size calculation in ioremapping code

parisc __ioremap(): fix off-by-one error in page alignment of allocation
size for sizes where size%PAGE_SIZE==1.
Signed-off-by: default avatarFlorian Zumbiehl <florz@florz.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Acked-by: default avatarHelge Deller <deller@gmx.de>
Tested-by: default avatarHelge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 17e46503
......@@ -71,7 +71,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
*/
offset = phys_addr & ~PAGE_MASK;
phys_addr &= PAGE_MASK;
size = PAGE_ALIGN(last_addr) - phys_addr;
size = PAGE_ALIGN(last_addr + 1) - phys_addr;
/*
* Ok, go for it..
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment