sh: Kill off some superfluous legacy PMB special casing.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 16 Feb 2010 12:43:38 +0000 (21:43 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 16 Feb 2010 12:43:38 +0000 (21:43 +0900)
The __va()/__pa() offsets and the boot memory offsets are consistent for
all PMB users, so there is no need to special case these for legacy PMB.
Kill the special casing off and depend on CONFIG_PMB across the board.
This also fixes up yet another addressing bug for sh64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/page.h
arch/sh/kernel/vmlinux.lds.S

index 61e58105adc30ea0c29e82a6d7b56f5d273b0166..3accdc5ab122ec1827ffd7aa9676e27e8ab9a5d6 100644 (file)
@@ -127,12 +127,7 @@ typedef struct page *pgtable_t;
  * is not visible (it is part of the PMB mapping) and so needs to be
  * added or subtracted as required.
  */
-#if defined(CONFIG_PMB_LEGACY)
-/* phys = virt - PAGE_OFFSET - (__MEMORY_START & 0xe0000000) */
-#define PMB_OFFSET     (PAGE_OFFSET - PXSEG(__MEMORY_START))
-#define __pa(x)        ((unsigned long)(x) - PMB_OFFSET)
-#define __va(x)        ((void *)((unsigned long)(x) + PMB_OFFSET))
-#elif defined(CONFIG_32BIT)
+#ifdef CONFIG_PMB
 #define __pa(x)        ((unsigned long)(x)-PAGE_OFFSET+__MEMORY_START)
 #define __va(x)        ((void *)((unsigned long)(x)+PAGE_OFFSET-__MEMORY_START))
 #else
index 0e66c7b30e0fe9373508176370ee92341b291854..7f8a709c3adaa3c9f9f5b31ca3f2c1c7a9650895 100644 (file)
@@ -14,11 +14,10 @@ OUTPUT_ARCH(sh)
 #include <asm/cache.h>
 #include <asm/vmlinux.lds.h>
 
-#if defined(CONFIG_29BIT) || defined(CONFIG_SUPERH64) || \
-    defined(CONFIG_PMB_LEGACY)
- #define MEMORY_OFFSET __MEMORY_START
+#ifdef CONFIG_PMB
+ #define MEMORY_OFFSET 0
 #else
- #define MEMORY_OFFSET  0
+ #define MEMORY_OFFSET __MEMORY_START
 #endif
 
 ENTRY(_start)