]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sh: Add support for 16kB PAGE_SIZE.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 3 Jun 2008 09:54:02 +0000 (18:54 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jul 2008 09:10:29 +0000 (18:10 +0900)
16kB is a useful size on nommu, while 64kB still tends to be too big to
be useful. Newer MMUs are likely to support this as well, so plug it
in in anticipation of those, too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/Kconfig
include/asm-sh/page.h
include/asm-sh/pgtable_32.h
include/asm-sh/thread_info.h

index 5267c434d6eb790fb3d858a02ccbb734ccc4da02..29d8e3c58b3401c68700a51df7df48fe7473e4ed 100644 (file)
@@ -155,6 +155,12 @@ config PAGE_SIZE_8KB
        help
          This enables 8kB pages as supported by SH-X2 and later MMUs.
 
+config PAGE_SIZE_16KB
+       bool "16kB"
+       depends on !MMU
+       help
+         This enables 16kB pages on MMU-less SH systems.
+
 config PAGE_SIZE_64KB
        bool "64kB"
        depends on !MMU || CPU_SH4 || CPU_SH5
index 5dc01d2fcc4cd5a7a2e1f9666b4b07a005703941..77fb8bf02e4e846b8dfcb969cac079e3009e768a 100644 (file)
@@ -12,6 +12,8 @@
 # define PAGE_SHIFT    12
 #elif defined(CONFIG_PAGE_SIZE_8KB)
 # define PAGE_SHIFT    13
+#elif defined(CONFIG_PAGE_SIZE_16KB)
+# define PAGE_SHIFT    14
 #elif defined(CONFIG_PAGE_SIZE_64KB)
 # define PAGE_SHIFT    16
 #else
index cbc731d35c25a1a96f8cef4bef6daa7f2563ccdb..72ea209195bd1103443b6548b7f1f8d483616e21 100644 (file)
 #define _PAGE_FLAGS_HARDWARE_MASK      (PHYS_ADDR_MASK & ~(_PAGE_CLEAR_FLAGS))
 
 /* Hardware flags, page size encoding */
-#if defined(CONFIG_X2TLB)
+#if !defined(CONFIG_MMU)
+# define _PAGE_FLAGS_HARD      0ULL
+#elif defined(CONFIG_X2TLB)
 # if defined(CONFIG_PAGE_SIZE_4KB)
 #  define _PAGE_FLAGS_HARD     _PAGE_EXT(_PAGE_EXT_ESZ0)
 # elif defined(CONFIG_PAGE_SIZE_8KB)
index 5131e390752510be5e0cae412c033530b616874e..eeb4c747119eb2fab268ba854a63b22b9eeb8948 100644 (file)
@@ -38,6 +38,8 @@ struct thread_info {
 #define THREAD_SIZE_ORDER      (1)
 #elif defined(CONFIG_PAGE_SIZE_8KB)
 #define THREAD_SIZE_ORDER      (1)
+#elif defined(CONFIG_PAGE_SIZE_16KB)
+#define THREAD_SIZE_ORDER      (0)
 #elif defined(CONFIG_PAGE_SIZE_64KB)
 #define THREAD_SIZE_ORDER      (0)
 #else