ChangeSet 1.2181.2.53, 2005/03/27 20:46:20-08:00, [EMAIL PROTECTED]
[SPARC64]: Make PAGE_SIZE configurable.
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
arch/sparc64/Kconfig | 29 +++++++++++++++++++++++++++++
include/asm-sparc64/page.h | 11 +++++++++++
2 files changed, 40 insertions(+)
diff -Nru a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
--- a/arch/sparc64/Kconfig 2005-04-03 21:14:22 -07:00
+++ b/arch/sparc64/Kconfig 2005-04-03 21:14:22 -07:00
@@ -16,6 +16,33 @@
bool
default y
+choice
+ prompt "Kernel page size"
+ default SPARC64_PAGE_SIZE_8KB
+
+config SPARC64_PAGE_SIZE_8KB
+ bool "8KB"
+ help
+ This lets you select the page size of the kernel.
+
+ 8KB and 64KB work quite well, since Sparc ELF sections
+ provide for up to 64KB alignment.
+
+ Therefore, 512KB and 4MB are for expert hackers only.
+
+ If you don't know what to do, choose 8KB.
+
+config SPARC64_PAGE_SIZE_64KB
+ bool "64KB"
+
+config SPARC64_PAGE_SIZE_512KB
+ bool "512KB"
+
+config SPARC64_PAGE_SIZE_4MB
+ bool "4MB"
+
+endchoice
+
source "init/Kconfig"
config SYSVIPC_COMPAT
@@ -198,9 +225,11 @@
bool "4MB"
config HUGETLB_PAGE_SIZE_512K
+ depends on !SPARC64_PAGE_SIZE_4MB
bool "512K"
config HUGETLB_PAGE_SIZE_64K
+ depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512K
bool "64K"
endchoice
diff -Nru a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h
--- a/include/asm-sparc64/page.h 2005-04-03 21:14:22 -07:00
+++ b/include/asm-sparc64/page.h 2005-04-03 21:14:22 -07:00
@@ -6,7 +6,18 @@
#include <linux/config.h>
#include <asm/const.h>
+#if defined(CONFIG_SPARC64_PAGE_SIZE_8KB)
#define PAGE_SHIFT 13
+#elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB)
+#define PAGE_SHIFT 16
+#elif defined(CONFIG_SPARC64_PAGE_SIZE_512KB)
+#define PAGE_SHIFT 19
+#elif defined(CONFIG_SPARC64_PAGE_SIZE_4MB)
+#define PAGE_SHIFT 22
+#else
+#error No page size specified in kernel configuration
+#endif
+
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html