From: Matt Fleming Date: Tue, 6 Oct 2009 21:22:27 +0000 (+0000) Subject: sh: Try PMB mapping based on physical address, not mapping size X-Git-Tag: v2.6.32-rc4~20^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2bea7ea7d57fd0022f4cd08ed3d4eb2d39a2920d;p=profile%2Fivi%2Fkernel-x86-ivi.git sh: Try PMB mapping based on physical address, not mapping size We should favour PMB mappings when the physical address cannot be reached with 29-bits. Signed-off-by: Matt Fleming Signed-off-by: Paul Mundt --- diff --git a/arch/sh/mm/ioremap_32.c b/arch/sh/mm/ioremap_32.c index c325061..a86eaa9 100644 --- a/arch/sh/mm/ioremap_32.c +++ b/arch/sh/mm/ioremap_32.c @@ -83,7 +83,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, * * PMB entries are all pre-faulted. */ - if (unlikely(size >= 0x1000000)) { + if (unlikely(phys_addr >= P1SEG)) { unsigned long mapped = pmb_remap(addr, phys_addr, size, flags); if (likely(mapped)) {