提交 a292dfa0 编写于 作者: F Florian Zumbiehl 提交者: 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: NFlorian Zumbiehl <florz@florz.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Acked-by: NHelge Deller <deller@gmx.de>
Tested-by: NHelge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册