From: Dave Hansen <haveblue@us.ibm.com>
To: linux-mm@kvack.org
Cc: linux-ia64@vger.kernel.org, rdunlap@xenotime.net,
lethal@linux-sh.org, Dave Hansen <haveblue@us.ibm.com>
Subject: [RFC][PATCH 08/10] parisc generic PAGE_SIZE
Date: Tue, 29 Aug 2006 13:19:40 -0700 [thread overview]
Message-ID: <20060829201940.FBA0E0DE@localhost.localdomain> (raw)
In-Reply-To: <20060829201934.47E63D1F@localhost.localdomain>
This is the parisc portion to convert it over to the generic PAGE_SIZE
framework.
* remove parisc-specific Kconfig menu
* add parisc default of 4k pages to mm/Kconfig
* replace parisc Kconfig menu with plain bool Kconfig option to
cover both 16KB and 64KB pages: PARISC_LARGER_PAGE_SIZES.
This preserves the dependencies on PA8X00.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---
threadalloc-dave/include/asm-parisc/pgtable.h | 8 +++---
threadalloc-dave/include/asm-parisc/page.h | 25 ---------------------
threadalloc-dave/arch/parisc/Kconfig | 30 +++-----------------------
threadalloc-dave/arch/parisc/defconfig | 6 ++---
threadalloc-dave/arch/parisc/mm/init.c | 2 -
threadalloc-dave/mm/Kconfig | 7 +++---
6 files changed, 17 insertions(+), 61 deletions(-)
diff -puN include/asm-parisc/pgtable.h~parisc include/asm-parisc/pgtable.h
--- threadalloc/include/asm-parisc/pgtable.h~parisc 2006-08-29 13:14:48.000000000 -0700
+++ threadalloc-dave/include/asm-parisc/pgtable.h 2006-08-29 13:14:56.000000000 -0700
@@ -66,7 +66,7 @@
#endif
#define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER)
-#if defined(CONFIG_64BIT) && defined(CONFIG_PARISC_PAGE_SIZE_4KB)
+#if defined(CONFIG_64BIT) && defined(CONFIG_PAGE_SIZE_4KB)
#define PT_NLEVELS 3
#define PGD_ORDER 1 /* Number of pages per pgd */
#define PMD_ORDER 1 /* Number of pages per pmd */
@@ -514,11 +514,11 @@ static inline void ptep_set_wrprotect(st
#define _PAGE_SIZE_ENCODING_16M 6
#define _PAGE_SIZE_ENCODING_64M 7
-#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
+#if defined(CONFIG_PAGE_SIZE_4KB)
# define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_4K
-#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
+#elif defined(CONFIG_PAGE_SIZE_16KB)
# define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_16K
-#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
+#elif defined(CONFIG_PAGE_SIZE_64KB)
# define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_64K
#endif
diff -puN include/asm-parisc/page.h~parisc include/asm-parisc/page.h
--- threadalloc/include/asm-parisc/page.h~parisc 2006-08-29 13:14:48.000000000 -0700
+++ threadalloc-dave/include/asm-parisc/page.h 2006-08-29 13:14:56.000000000 -0700
@@ -1,29 +1,10 @@
#ifndef _PARISC_PAGE_H
#define _PARISC_PAGE_H
-#if !defined(__KERNEL__)
-/* this is for userspace applications (4k page size) */
-# define PAGE_SHIFT 12 /* 4k */
-# define PAGE_SIZE (1UL << PAGE_SHIFT)
-# define PAGE_MASK (~(PAGE_SIZE-1))
-#endif
-
+#include <asm-generic/page.h>
#ifdef __KERNEL__
-#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
-# define PAGE_SHIFT 12 /* 4k */
-#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
-# define PAGE_SHIFT 14 /* 16k */
-#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
-# define PAGE_SHIFT 16 /* 64k */
-#else
-# error "unknown default kernel page size"
-#endif
-#define PAGE_SIZE (1UL << PAGE_SHIFT)
-#define PAGE_MASK (~(PAGE_SIZE-1))
-
-
#ifndef __ASSEMBLY__
#include <asm/types.h>
@@ -140,10 +121,6 @@ extern int npmem_ranges;
#define PMD_ENTRY_SIZE (1UL << BITS_PER_PMD_ENTRY)
#define PTE_ENTRY_SIZE (1UL << BITS_PER_PTE_ENTRY)
-/* to align the pointer to the (next) page boundary */
-#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
-
-
#define LINUX_GATEWAY_SPACE 0
/* This governs the relationship between virtual and physical addresses.
diff -puN arch/parisc/Kconfig~parisc arch/parisc/Kconfig
--- threadalloc/arch/parisc/Kconfig~parisc 2006-08-29 13:14:48.000000000 -0700
+++ threadalloc-dave/arch/parisc/Kconfig 2006-08-29 13:14:56.000000000 -0700
@@ -142,34 +142,12 @@ config 64BIT
enable this option otherwise. The 64bit kernel is significantly bigger
and slower than the 32bit one.
-choice
- prompt "Kernel page size"
- default PARISC_PAGE_SIZE_4KB if !64BIT
- default PARISC_PAGE_SIZE_4KB if 64BIT
-# default PARISC_PAGE_SIZE_16KB if 64BIT
-
-config PARISC_PAGE_SIZE_4KB
- bool "4KB"
- help
- This lets you select the page size of the kernel. For best
- performance, a page size of 16KB is recommended. For best
- compatibility with 32bit applications, a page size of 4KB should be
- selected (the vast majority of 32bit binaries work perfectly fine
- with a larger page size).
-
- 4KB For best 32bit compatibility
- 16KB For best performance
- 64KB For best performance, might give more overhead.
-
- If you don't know what to do, choose 4KB.
-
-config PARISC_PAGE_SIZE_16KB
- bool "16KB (EXPERIMENTAL)"
+config PARISC_LARGER_PAGE_SIZES
+ def_bool y
depends on PA8X00 && EXPERIMENTAL
-config PARISC_PAGE_SIZE_64KB
- bool "64KB (EXPERIMENTAL)"
- depends on PA8X00 && EXPERIMENTAL
+config ARCH_GENERIC_PAGE_SIZE
+ def_bool y
endchoice
diff -puN arch/parisc/defconfig~parisc arch/parisc/defconfig
--- threadalloc/arch/parisc/defconfig~parisc 2006-08-29 13:14:48.000000000 -0700
+++ threadalloc-dave/arch/parisc/defconfig 2006-08-29 13:14:56.000000000 -0700
@@ -91,9 +91,9 @@ CONFIG_PA7100LC=y
# CONFIG_PA7300LC is not set
# CONFIG_PA8X00 is not set
CONFIG_PA11=y
-CONFIG_PARISC_PAGE_SIZE_4KB=y
-# CONFIG_PARISC_PAGE_SIZE_16KB is not set
-# CONFIG_PARISC_PAGE_SIZE_64KB is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
# CONFIG_SMP is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
# CONFIG_PREEMPT_NONE is not set
diff -puN arch/parisc/mm/init.c~parisc arch/parisc/mm/init.c
--- threadalloc/arch/parisc/mm/init.c~parisc 2006-08-29 13:14:48.000000000 -0700
+++ threadalloc-dave/arch/parisc/mm/init.c 2006-08-29 13:14:56.000000000 -0700
@@ -642,7 +642,7 @@ static void __init map_pages(unsigned lo
* Map the fault vector writable so we can
* write the HPMC checksum.
*/
-#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
+#if defined(CONFIG_PAGE_SIZE_4KB)
if (address >= ro_start && address < ro_end
&& address != fv_addr
&& address != gw_addr)
diff -puN mm/Kconfig~parisc mm/Kconfig
--- threadalloc/mm/Kconfig~parisc 2006-08-29 13:14:55.000000000 -0700
+++ threadalloc-dave/mm/Kconfig 2006-08-29 13:14:56.000000000 -0700
@@ -5,7 +5,7 @@ config ARCH_HAVE_GET_ORDER
choice
prompt "Kernel Page Size"
depends on ARCH_GENERIC_PAGE_SIZE
- default PAGE_SIZE_4KB if MIPS
+ default PAGE_SIZE_4KB if MIPS || PARISC
default PAGE_SIZE_8KB if SPARC64
default PAGE_SIZE_16KB if IA64
config PAGE_SIZE_4KB
@@ -30,10 +30,11 @@ config PAGE_SIZE_8KB
depends on IA64 || SPARC64 || MIPS_PAGE_SIZE_8KB
config PAGE_SIZE_16KB
bool "16KB"
- depends on IA64 || MIPS_PAGE_SIZE_16KB
+ depends on IA64 || MIPS_PAGE_SIZE_16KB || PARISC_LARGER_PAGE_SIZES
config PAGE_SIZE_64KB
bool "64KB"
- depends on (IA64 && !ITANIUM) || SPARC64 || MIPS_PAGE_SIZE_64KB
+ depends on (IA64 && !ITANIUM) || SPARC64 || MIPS_PAGE_SIZE_64KB || \
+ PARISC_LARGER_PAGE_SIZES
config PAGE_SIZE_512KB
bool "512KB"
depends on SPARC64
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-08-29 20:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 20:19 [RFC][PATCH 00/10] generic PAGE_SIZE infrastructure (v3) Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 01/10] put alignment macros in align.h Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 02/10] conditionally define generic get_order() (ARCH_HAS_GET_ORDER) Dave Hansen
2006-08-30 10:20 ` Paul Mundt
2006-08-29 20:19 ` [RFC][PATCH 03/10] actual generic PAGE_SIZE infrastructure Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 05/10] ia64 generic PAGE_SIZE Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 04/10] replace _ALIGN() Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 06/10] sparc64 generic PAGE_SIZE Dave Hansen
2006-08-29 21:33 ` Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 07/10] mips " Dave Hansen
2006-08-29 20:19 ` Dave Hansen [this message]
2006-08-29 20:19 ` [RFC][PATCH 09/10] powerpc " Dave Hansen
2006-08-29 20:19 ` [RFC][PATCH 10/10] convert the "easy" architectures to " Dave Hansen
2006-08-30 10:05 ` Paul Mundt
2006-08-30 14:56 ` 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=20060829201940.FBA0E0DE@localhost.localdomain \
--to=haveblue@us.ibm.com \
--cc=lethal@linux-sh.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rdunlap@xenotime.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox