From: Florian Zumbiehl Date: Wed, 11 Aug 2010 21:17:33 +0000 (-0700) Subject: parisc: fix wrong page aligned size calculation in ioremapping code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a292dfa01794477126d3f022559eb235edde00b0;p=openwrt%2Fstaging%2Fblogic.git 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: Florian Zumbiehl Cc: Kyle McMartin Acked-by: Helge Deller Tested-by: Helge Deller Cc: "James E.J. Bottomley" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c index 92d496ad07c9..838d0259cd27 100644 --- a/arch/parisc/mm/ioremap.c +++ b/arch/parisc/mm/ioremap.c @@ -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..