[PATCH] ppc: Add support for bigger page sizes than 4KB on PPC44x
Yuri Tikhonov
yur at emcraft.com
Thu Apr 26 03:37:06 EST 2007
The patch replaces the CONFIG_PPC_PAGE_SHIFT integer option with choice of
three boolean options
Signed-off-by: Yuri Tikhonov <yur at emcraft.com>
--
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 72af523..5eb58dc 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1201,15 +1201,24 @@ config SECCOMP
If unsure, say Y. Only embedded should say N here.
-config PPC_PAGE_SHIFT
- int "Page size (12=>4KB; 14=>16KB; 16=>64KB)" if 44x
- default "12"
- range 12 16
- help
+choice
+ prompt "Page size"
+ default PPC_PAGE_4K
+ ---help---
The PAGE_SIZE definition. Increasing the page size may
improve the system performance in some dedicated cases.
- If unsure, set it to 12 (4KB).
+ If unsure, set it to 4 KB.
+
+config PPC_PAGE_4K
+ bool "4 KB"
+
+config PPC_PAGE_16K
+ bool "16 KB" if 44x
+
+config PPC_PAGE_64K
+ bool "64 KB" if 44x
+endchoice
endmenu
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 0b8f354..f46712e 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -4,7 +4,13 @@
#include <asm/asm-compat.h>
/* PAGE_SHIFT determines the page size */
-#define PAGE_SHIFT CONFIG_PPC_PAGE_SHIFT
+#if defined(CONFIG_PPC_PAGE_4K)
+#define PAGE_SHIFT 12
+#elif defined(CONFIG_PPC_PAGE_16K)
+#define PAGE_SHIFT 14
+#elif defined(CONFIG_PPC_PAGE_64K)
+#define PAGE_SHIFT 16
+#endif
#define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
/*
More information about the Linuxppc-dev
mailing list