sh: Fix up uncached offset for legacy 29-bit mode.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 8 Mar 2010 12:03:21 +0000 (21:03 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 8 Mar 2010 12:03:21 +0000 (21:03 +0900)
The uncached_start was being set up properly for 32-bit but managed to
break 29-bit in the process, fix it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/uncached.c

index cf20a5c5136a72ef6b0a89519f203894239343a9..2ef57efeb225c515615f7e22a46fda3c9d5f762c 100644 (file)
@@ -1,6 +1,7 @@
 #include <linux/init.h>
 #include <asm/sizes.h>
 #include <asm/page.h>
+#include <asm/addrspace.h>
 
 /*
  * This is the offset of the uncached section from its cached alias.
@@ -23,7 +24,11 @@ int virt_addr_uncached(unsigned long kaddr)
 
 void __init uncached_init(void)
 {
+#ifdef CONFIG_29BIT
+       uncached_start = P2SEG;
+#else
        uncached_start = memory_end;
+#endif
        uncached_end = uncached_start + uncached_size;
 }