From a292dfa01794477126d3f022559eb235edde00b0 Mon Sep 17 00:00:00 2001 From: Florian Zumbiehl Date: Wed, 11 Aug 2010 14:17:33 -0700 Subject: 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 --- arch/parisc/mm/ioremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/parisc/mm/ioremap.c') 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.. -- cgit v1.2.3