diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-06-03 05:54:02 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 05:10:29 -0400 |
commit | 66dfe18114839a7297f56f43f03125f4121de79b (patch) | |
tree | 74519e931d2205d0871ed541297977100b110a9f | |
parent | 74fcc77982e703fe85d8bd5437130fd94c61daee (diff) |
sh: Add support for 16kB PAGE_SIZE.
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>
-rw-r--r-- | arch/sh/mm/Kconfig | 6 | ||||
-rw-r--r-- | include/asm-sh/page.h | 2 | ||||
-rw-r--r-- | include/asm-sh/pgtable_32.h | 4 | ||||
-rw-r--r-- | include/asm-sh/thread_info.h | 2 |
4 files changed, 13 insertions, 1 deletions
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 5267c434d6eb..29d8e3c58b34 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig | |||
@@ -155,6 +155,12 @@ config PAGE_SIZE_8KB | |||
155 | help | 155 | help |
156 | This enables 8kB pages as supported by SH-X2 and later MMUs. | 156 | This enables 8kB pages as supported by SH-X2 and later MMUs. |
157 | 157 | ||
158 | config PAGE_SIZE_16KB | ||
159 | bool "16kB" | ||
160 | depends on !MMU | ||
161 | help | ||
162 | This enables 16kB pages on MMU-less SH systems. | ||
163 | |||
158 | config PAGE_SIZE_64KB | 164 | config PAGE_SIZE_64KB |
159 | bool "64kB" | 165 | bool "64kB" |
160 | depends on !MMU || CPU_SH4 || CPU_SH5 | 166 | depends on !MMU || CPU_SH4 || CPU_SH5 |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 5dc01d2fcc4c..77fb8bf02e4e 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -12,6 +12,8 @@ | |||
12 | # define PAGE_SHIFT 12 | 12 | # define PAGE_SHIFT 12 |
13 | #elif defined(CONFIG_PAGE_SIZE_8KB) | 13 | #elif defined(CONFIG_PAGE_SIZE_8KB) |
14 | # define PAGE_SHIFT 13 | 14 | # define PAGE_SHIFT 13 |
15 | #elif defined(CONFIG_PAGE_SIZE_16KB) | ||
16 | # define PAGE_SHIFT 14 | ||
15 | #elif defined(CONFIG_PAGE_SIZE_64KB) | 17 | #elif defined(CONFIG_PAGE_SIZE_64KB) |
16 | # define PAGE_SHIFT 16 | 18 | # define PAGE_SHIFT 16 |
17 | #else | 19 | #else |
diff --git a/include/asm-sh/pgtable_32.h b/include/asm-sh/pgtable_32.h index cbc731d35c25..72ea209195bd 100644 --- a/include/asm-sh/pgtable_32.h +++ b/include/asm-sh/pgtable_32.h | |||
@@ -102,7 +102,9 @@ | |||
102 | #define _PAGE_FLAGS_HARDWARE_MASK (PHYS_ADDR_MASK & ~(_PAGE_CLEAR_FLAGS)) | 102 | #define _PAGE_FLAGS_HARDWARE_MASK (PHYS_ADDR_MASK & ~(_PAGE_CLEAR_FLAGS)) |
103 | 103 | ||
104 | /* Hardware flags, page size encoding */ | 104 | /* Hardware flags, page size encoding */ |
105 | #if defined(CONFIG_X2TLB) | 105 | #if !defined(CONFIG_MMU) |
106 | # define _PAGE_FLAGS_HARD 0ULL | ||
107 | #elif defined(CONFIG_X2TLB) | ||
106 | # if defined(CONFIG_PAGE_SIZE_4KB) | 108 | # if defined(CONFIG_PAGE_SIZE_4KB) |
107 | # define _PAGE_FLAGS_HARD _PAGE_EXT(_PAGE_EXT_ESZ0) | 109 | # define _PAGE_FLAGS_HARD _PAGE_EXT(_PAGE_EXT_ESZ0) |
108 | # elif defined(CONFIG_PAGE_SIZE_8KB) | 110 | # elif defined(CONFIG_PAGE_SIZE_8KB) |
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index 5131e3907525..eeb4c747119e 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h | |||
@@ -38,6 +38,8 @@ struct thread_info { | |||
38 | #define THREAD_SIZE_ORDER (1) | 38 | #define THREAD_SIZE_ORDER (1) |
39 | #elif defined(CONFIG_PAGE_SIZE_8KB) | 39 | #elif defined(CONFIG_PAGE_SIZE_8KB) |
40 | #define THREAD_SIZE_ORDER (1) | 40 | #define THREAD_SIZE_ORDER (1) |
41 | #elif defined(CONFIG_PAGE_SIZE_16KB) | ||
42 | #define THREAD_SIZE_ORDER (0) | ||
41 | #elif defined(CONFIG_PAGE_SIZE_64KB) | 43 | #elif defined(CONFIG_PAGE_SIZE_64KB) |
42 | #define THREAD_SIZE_ORDER (0) | 44 | #define THREAD_SIZE_ORDER (0) |
43 | #else | 45 | #else |