sh: Add support for 16kB PAGE_SIZE.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:06 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66dfe1...
Commit:     66dfe18114839a7297f56f43f03125f4121de79b
Parent:     74fcc77982e703fe85d8bd5437130fd94c61daee
Author:     Paul Mundt <lethal@linux-sh.org>
AuthorDate: Tue Jun 3 18:54:02 2008 +0900
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Mon Jul 28 18:10:29 2008 +0900

    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>
---
 arch/sh/mm/Kconfig           |    6 ++++++
 include/asm-sh/page.h        |    2 ++
 include/asm-sh/pgtable_32.h  |    4 +++-
 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 5267c43..29d8e3c 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -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
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 5dc01d2..77fb8bf 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -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
diff --git a/include/asm-sh/pgtable_32.h b/include/asm-sh/pgtable_32.h
index cbc731d..72ea209 100644
--- a/include/asm-sh/pgtable_32.h
+++ b/include/asm-sh/pgtable_32.h
@@ -102,7 +102,9 @@
 #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)
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h
index 5131e39..eeb4c74 100644
--- a/include/asm-sh/thread_info.h
+++ b/include/asm-sh/thread_info.h
@@ -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
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sh: Add support for 16kB PAGE_SIZE., Linux Kernel Mailing ..., (Mon Jul 28, 10:06 am)