From: Dave Hansen <haveblue@us.ibm.com>
To: linux-arch@vger.kernel.org
Cc: Dave Hansen <haveblue@us.ibm.com>
Subject: [PATCH 4/9] ia64 generic PAGE_SIZE
Date: Fri, 01 Sep 2006 12:08:07 -0700 [thread overview]
Message-ID: <20060901190807.1C6C69CB@localhost.localdomain> (raw)
In-Reply-To: <20060901190805.C906A21A@localhost.localdomain>
This is the ia64 portion to convert it over to the generic PAGE_SIZE
framework.
* Change all references to CONFIG_IA64_PAGE_SIZE_*KB to
CONFIG_PAGE_SIZE_* and update the defconfigs.
* remove ia64-specific Kconfig menu
* add ia64 default of 16k pages to mm/Kconfig
* add support for 8k and 16k pages, plus 64k if !ITANIUM
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---
threadalloc-dave/include/asm-ia64/page.h | 21 ----------
threadalloc-dave/include/asm-ia64/ptrace.h | 6 +--
threadalloc-dave/arch/ia64/Kconfig | 34 +----------------
threadalloc-dave/arch/ia64/configs/bigsur_defconfig | 8 ++--
threadalloc-dave/arch/ia64/configs/gensparse_defconfig | 8 ++--
threadalloc-dave/arch/ia64/configs/sim_defconfig | 8 ++--
threadalloc-dave/arch/ia64/configs/sn2_defconfig | 8 ++--
threadalloc-dave/arch/ia64/configs/tiger_defconfig | 8 ++--
threadalloc-dave/arch/ia64/configs/zx1_defconfig | 8 ++--
threadalloc-dave/arch/ia64/defconfig | 8 ++--
threadalloc-dave/mm/Kconfig | 4 ++
11 files changed, 38 insertions(+), 83 deletions(-)
diff -puN include/asm-ia64/page.h~ia64 include/asm-ia64/page.h
--- threadalloc/include/asm-ia64/page.h~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/include/asm-ia64/page.h 2006-09-01 11:30:56.000000000 -0700
@@ -7,7 +7,7 @@
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
-
+#include <asm-generic/page.h>
#include <asm/intrinsics.h>
#include <asm/types.h>
@@ -24,25 +24,6 @@
#define RGN_GATE 5 /* Gate page, Kernel text, etc */
#define RGN_HPAGE 4 /* For Huge TLB pages */
-/*
- * PAGE_SHIFT determines the actual kernel page size.
- */
-#if defined(CONFIG_IA64_PAGE_SIZE_4KB)
-# define PAGE_SHIFT 12
-#elif defined(CONFIG_IA64_PAGE_SIZE_8KB)
-# define PAGE_SHIFT 13
-#elif defined(CONFIG_IA64_PAGE_SIZE_16KB)
-# define PAGE_SHIFT 14
-#elif defined(CONFIG_IA64_PAGE_SIZE_64KB)
-# define PAGE_SHIFT 16
-#else
-# error Unsupported page size!
-#endif
-
-#define PAGE_SIZE (__IA64_UL_CONST(1) << PAGE_SHIFT)
-#define PAGE_MASK (~(PAGE_SIZE - 1))
-#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
-
#define PERCPU_PAGE_SHIFT 16 /* log2() of max. size of per-CPU area */
#define PERCPU_PAGE_SIZE (__IA64_UL_CONST(1) << PERCPU_PAGE_SHIFT)
diff -puN include/asm-ia64/ptrace.h~ia64 include/asm-ia64/ptrace.h
--- threadalloc/include/asm-ia64/ptrace.h~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/include/asm-ia64/ptrace.h 2006-09-01 11:30:56.000000000 -0700
@@ -64,11 +64,11 @@
* Base-2 logarithm of number of pages to allocate per task structure
* (including register backing store and memory stack):
*/
-#if defined(CONFIG_IA64_PAGE_SIZE_4KB)
+#if defined(CONFIG_PAGE_SIZE_4KB)
# define KERNEL_STACK_SIZE_ORDER 3
-#elif defined(CONFIG_IA64_PAGE_SIZE_8KB)
+#elif defined(CONFIG_PAGE_SIZE_8KB)
# define KERNEL_STACK_SIZE_ORDER 2
-#elif defined(CONFIG_IA64_PAGE_SIZE_16KB)
+#elif defined(CONFIG_PAGE_SIZE_16KB)
# define KERNEL_STACK_SIZE_ORDER 1
#else
# define KERNEL_STACK_SIZE_ORDER 0
diff -puN arch/ia64/Kconfig~ia64 arch/ia64/Kconfig
--- threadalloc/arch/ia64/Kconfig~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/arch/ia64/Kconfig 2006-09-01 11:30:56.000000000 -0700
@@ -149,38 +149,8 @@ config MCKINLEY
endchoice
-choice
- prompt "Kernel page size"
- default IA64_PAGE_SIZE_16KB
-
-config IA64_PAGE_SIZE_4KB
- bool "4KB"
- help
- This lets you select the page size of the kernel. For best IA-64
- performance, a page size of 8KB or 16KB is recommended. For best
- IA-32 compatibility, a page size of 4KB should be selected (the vast
- majority of IA-32 binaries work perfectly fine with a larger page
- size). For Itanium 2 or newer systems, a page size of 64KB can also
- be selected.
-
- 4KB For best IA-32 compatibility
- 8KB For best IA-64 performance
- 16KB For best IA-64 performance
- 64KB Requires Itanium 2 or newer processor.
-
- If you don't know what to do, choose 16KB.
-
-config IA64_PAGE_SIZE_8KB
- bool "8KB"
-
-config IA64_PAGE_SIZE_16KB
- bool "16KB"
-
-config IA64_PAGE_SIZE_64KB
- depends on !ITANIUM
- bool "64KB"
-
-endchoice
+config ARCH_GENERIC_PAGE_SIZE
+ def_bool y
choice
prompt "Page Table Levels"
diff -puN arch/ia64/configs/bigsur_defconfig~ia64 arch/ia64/configs/bigsur_defconfig
--- threadalloc/arch/ia64/configs/bigsur_defconfig~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/arch/ia64/configs/bigsur_defconfig 2006-09-01 11:30:56.000000000 -0700
@@ -98,10 +98,10 @@ CONFIG_IA64_DIG=y
# CONFIG_IA64_HP_SIM is not set
CONFIG_ITANIUM=y
# CONFIG_MCKINLEY is not set
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
+# CONFIG_PAGE_SIZE_4KB is not set
+# CONFIG_PAGE_SIZE_8KB is not set
+CONFIG_PAGE_SIZE_16KB=y
+# CONFIG_PAGE_SIZE_64KB is not set
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
# CONFIG_HZ_100 is not set
diff -puN arch/ia64/configs/gensparse_defconfig~ia64 arch/ia64/configs/gensparse_defconfig
--- threadalloc/arch/ia64/configs/gensparse_defconfig~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/arch/ia64/configs/gensparse_defconfig 2006-09-01 11:30:56.000000000 -0700
@@ -99,10 +99,10 @@ CONFIG_IA64_GENERIC=y
# CONFIG_IA64_HP_SIM is not set
# CONFIG_ITANIUM is not set
CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
+# CONFIG_PAGE_SIZE_4KB is not set
+# CONFIG_PAGE_SIZE_8KB is not set
+CONFIG_PAGE_SIZE_16KB=y
+# CONFIG_PAGE_SIZE_64KB is not set
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
# CONFIG_HZ_100 is not set
diff -puN arch/ia64/configs/sim_defconfig~ia64 arch/ia64/configs/sim_defconfig
--- threadalloc/arch/ia64/configs/sim_defconfig~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/arch/ia64/configs/sim_defconfig 2006-09-01 11:30:56.000000000 -0700
@@ -99,10 +99,10 @@ CONFIG_DMA_IS_DMA32=y
CONFIG_IA64_HP_SIM=y
# CONFIG_ITANIUM is not set
CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-# CONFIG_IA64_PAGE_SIZE_16KB is not set
-CONFIG_IA64_PAGE_SIZE_64KB=y
+# CONFIG_PAGE_SIZE_4KB is not set
+# CONFIG_PAGE_SIZE_8KB is not set
+# CONFIG_PAGE_SIZE_16KB is not set
+CONFIG_PAGE_SIZE_64KB=y
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
# CONFIG_HZ_100 is not set
diff -puN arch/ia64/configs/sn2_defconfig~ia64 arch/ia64/configs/sn2_defconfig
--- threadalloc/arch/ia64/configs/sn2_defconfig~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/arch/ia64/configs/sn2_defconfig 2006-09-01 11:30:56.000000000 -0700
@@ -98,10 +98,10 @@ CONFIG_IA64_SGI_SN2=y
# CONFIG_IA64_HP_SIM is not set
# CONFIG_ITANIUM is not set
CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
+# CONFIG_PAGE_SIZE_4KB is not set
+# CONFIG_PAGE_SIZE_8KB is not set
+CONFIG_PAGE_SIZE_16KB=y
+# CONFIG_PAGE_SIZE_64KB is not set
# CONFIG_PGTABLE_3 is not set
CONFIG_PGTABLE_4=y
# CONFIG_HZ_100 is not set
diff -puN arch/ia64/configs/tiger_defconfig~ia64 arch/ia64/configs/tiger_defconfig
--- threadalloc/arch/ia64/configs/tiger_defconfig~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/arch/ia64/configs/tiger_defconfig 2006-09-01 11:30:56.000000000 -0700
@@ -99,10 +99,10 @@ CONFIG_IA64_DIG=y
# CONFIG_IA64_HP_SIM is not set
# CONFIG_ITANIUM is not set
CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
+# CONFIG_PAGE_SIZE_4KB is not set
+# CONFIG_PAGE_SIZE_8KB is not set
+CONFIG_PAGE_SIZE_16KB=y
+# CONFIG_PAGE_SIZE_64KB is not set
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
# CONFIG_HZ_100 is not set
diff -puN arch/ia64/configs/zx1_defconfig~ia64 arch/ia64/configs/zx1_defconfig
--- threadalloc/arch/ia64/configs/zx1_defconfig~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/arch/ia64/configs/zx1_defconfig 2006-09-01 11:30:56.000000000 -0700
@@ -97,10 +97,10 @@ CONFIG_IA64_HP_ZX1=y
# CONFIG_IA64_HP_SIM is not set
# CONFIG_ITANIUM is not set
CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
+# CONFIG_PAGE_SIZE_4KB is not set
+# CONFIG_PAGE_SIZE_8KB is not set
+CONFIG_PAGE_SIZE_16KB=y
+# CONFIG_PAGE_SIZE_64KB is not set
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
# CONFIG_HZ_100 is not set
diff -puN arch/ia64/defconfig~ia64 arch/ia64/defconfig
--- threadalloc/arch/ia64/defconfig~ia64 2006-09-01 11:28:15.000000000 -0700
+++ threadalloc-dave/arch/ia64/defconfig 2006-09-01 11:30:56.000000000 -0700
@@ -99,10 +99,10 @@ CONFIG_IA64_GENERIC=y
# CONFIG_IA64_HP_SIM is not set
# CONFIG_ITANIUM is not set
CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
+# CONFIG_PAGE_SIZE_4KB is not set
+# CONFIG_PAGE_SIZE_8KB is not set
+CONFIG_PAGE_SIZE_16KB=y
+# CONFIG_PAGE_SIZE_64KB is not set
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
# CONFIG_HZ_100 is not set
diff -puN mm/Kconfig~ia64 mm/Kconfig
--- threadalloc/mm/Kconfig~ia64 2006-09-01 11:30:55.000000000 -0700
+++ threadalloc-dave/mm/Kconfig 2006-09-01 11:30:56.000000000 -0700
@@ -5,6 +5,7 @@ config ARCH_HAVE_GET_ORDER
choice
prompt "Kernel page size"
depends on ARCH_GENERIC_PAGE_SIZE
+ default PAGE_SIZE_16KB if IA64
config PAGE_SIZE_4KB
bool "4KB"
help
@@ -26,10 +27,13 @@ config PAGE_SIZE_4KB
config PAGE_SIZE_8KB
bool "8KB"
+ depends on IA64
config PAGE_SIZE_16KB
bool "16KB"
+ depends on IA64
config PAGE_SIZE_64KB
bool "64KB"
+ depends on (IA64 && !ITANIUM)
config PAGE_SIZE_512KB
bool "512KB"
config PAGE_SIZE_4MB
_
next prev parent reply other threads:[~2006-09-01 19:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-01 19:08 [PATCH 0/9] generic PAGE_SIZE infrastructure (v5) Dave Hansen
2006-09-01 19:08 ` [PATCH 1/9] put alignment macros in align.h Dave Hansen
2006-09-01 19:08 ` [PATCH 2/9] conditionally define generic get_order() (ARCH_HAS_GET_ORDER) Dave Hansen
2006-09-01 19:08 ` Dave Hansen [this message]
2006-09-01 19:08 ` [PATCH 3/9] actual generic PAGE_SIZE infrastructure Dave Hansen
2006-09-05 5:28 ` David Woodhouse
2006-09-05 5:37 ` David Woodhouse
2006-09-05 17:52 ` Dave Hansen
2006-09-05 18:39 ` David Woodhouse
2006-09-05 5:49 ` Arnd Bergmann
2006-09-05 6:14 ` David Woodhouse
2006-09-01 19:08 ` [PATCH 5/9] sparc64 generic PAGE_SIZE Dave Hansen
2006-09-01 19:08 ` [PATCH 6/9] mips " Dave Hansen
2006-09-01 19:08 ` [PATCH 7/9] parisc " Dave Hansen
2006-09-01 19:08 ` [PATCH 8/9] powerpc " Dave Hansen
2006-09-01 19:08 ` [PATCH 9/9] convert the "easy" architectures to " Dave Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060901190807.1C6C69CB@localhost.localdomain \
--to=haveblue@us.ibm.com \
--cc=linux-arch@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.