diff mbox

[07/14] sh: Try PMB mapping based on physical address, not mapping size

Message ID 014aa11fe1891ca085d72b8b6fb56703b7637a8b.1254861984.git.matt@console-pimps.org (mailing list archive)
State Accepted
Headers show

Commit Message

Matt Fleming Oct. 6, 2009, 9:22 p.m. UTC
None
diff mbox

Patch

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)) {