]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: Split out 29-bit and 32-bit physical mode definitions.
authorPaul Mundt <lethal@linux-sh.org>
Sat, 10 Nov 2007 10:16:55 +0000 (19:16 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jan 2008 04:18:42 +0000 (13:18 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/Kconfig
arch/sh/mm/Makefile
include/asm-sh/pgtable.h

index a7bbc2cbbf8c44d20196fca4f98e9e12ee0a3cff..8192c872a69a1de7f67cc36ebadf118b4ddd692b 100644 (file)
@@ -46,9 +46,20 @@ config MEMORY_SIZE
          as 0x00400000 which was the default value before this became
          configurable.
 
+# Physical addressing modes
+
+config 29BIT
+       def_bool !32BIT
+       depends on SUPERH32
+
 config 32BIT
+       bool
+       default y if CPU_SH5
+
+config PMB
        bool "Support 32-bit physical addressing through PMB"
        depends on MMU && (CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
+       select 32BIT
        default y
        help
          If you say Y here, physical addressing will be extended to
index aa44607f072d9ae771bb8de57c230027494bd0cd..d35caccd0aaa4477cdf3166edf3e22a13f4cd9ad 100644 (file)
@@ -31,7 +31,7 @@ endif
 endif
 
 obj-$(CONFIG_HUGETLB_PAGE)     += hugetlbpage.o
-obj-$(CONFIG_32BIT)            += pmb.o
+obj-$(CONFIG_PMB)              += pmb.o
 obj-$(CONFIG_NUMA)             += numa.o
 
 EXTRA_CFLAGS += -Werror
index 8f1e8be8d15ddf7fc57f1774f6c7454fa5cc1a10..6ab3ba82d255e16a5fb84fe13ae9f5a02b0b65d5 100644 (file)
@@ -28,6 +28,23 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
 
 #endif /* !__ASSEMBLY__ */
 
+/*
+ * Effective and physical address definitions, to aid with sign
+ * extension.
+ */
+#define NEFF           32
+#define        NEFF_SIGN       (1LL << (NEFF - 1))
+#define        NEFF_MASK       (-1LL << NEFF)
+
+#ifdef CONFIG_29BIT
+#define NPHYS          29
+#else
+#define NPHYS          32
+#endif
+
+#define        NPHYS_SIGN      (1LL << (NPHYS - 1))
+#define        NPHYS_MASK      (-1LL << NPHYS)
+
 /*
  * traditional two-level paging structure
  */