linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: linux-mm@kvack.org
Cc: Dave Hansen <haveblue@us.ibm.com>
Subject: [RFC][PATCH 4/7] mips generic PAGE_SIZE
Date: Mon, 28 Aug 2006 08:44:15 -0700	[thread overview]
Message-ID: <20060828154415.59858A5A@localhost.localdomain> (raw)
In-Reply-To: <20060828154413.E05721BD@localhost.localdomain>

This is the mips portion to convert it over to the generic PAGE_SIZE
framework.

* remove mips-specific Kconfig menu
* add mips default of 4k pages to mm/Kconfig
* replace mips Kconfig menu with plain bool variables to preserve
  dependencies on specific CPUs.  Add to mm/Kconfig


Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 threadalloc-dave/include/asm-mips/page.h |   23 ----------------
 threadalloc-dave/arch/mips/Kconfig       |   43 +++++--------------------------
 threadalloc-dave/mm/Kconfig              |    7 ++---
 3 files changed, 13 insertions(+), 60 deletions(-)

diff -puN include/asm-mips/page.h~mips include/asm-mips/page.h
--- threadalloc/include/asm-mips/page.h~mips	2006-08-25 11:34:21.000000000 -0700
+++ threadalloc-dave/include/asm-mips/page.h	2006-08-25 11:34:25.000000000 -0700
@@ -9,6 +9,7 @@
 #ifndef _ASM_PAGE_H
 #define _ASM_PAGE_H
 
+#include <asm-generic/page.h>
 
 #ifdef __KERNEL__
 
@@ -16,25 +17,6 @@
 
 #endif
 
-/*
- * PAGE_SHIFT determines the page size
- */
-#ifdef CONFIG_PAGE_SIZE_4KB
-#define PAGE_SHIFT	12
-#endif
-#ifdef CONFIG_PAGE_SIZE_8KB
-#define PAGE_SHIFT	13
-#endif
-#ifdef CONFIG_PAGE_SIZE_16KB
-#define PAGE_SHIFT	14
-#endif
-#ifdef CONFIG_PAGE_SIZE_64KB
-#define PAGE_SHIFT	16
-#endif
-#define PAGE_SIZE	(1UL << PAGE_SHIFT)
-#define PAGE_MASK       (~((1 << PAGE_SHIFT) - 1))
-
-
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
 
@@ -130,9 +112,6 @@ typedef struct { unsigned long pgprot; }
 
 #endif /* !__ASSEMBLY__ */
 
-/* to align the pointer to the (next) page boundary */
-#define PAGE_ALIGN(addr)	(((addr) + PAGE_SIZE - 1) & PAGE_MASK)
-
 #define __pa(x)			((unsigned long) (x) - PAGE_OFFSET)
 #define __va(x)			((void *)((unsigned long) (x) + PAGE_OFFSET))
 
diff -puN arch/mips/Kconfig~mips arch/mips/Kconfig
--- threadalloc/arch/mips/Kconfig~mips	2006-08-25 11:34:21.000000000 -0700
+++ threadalloc-dave/arch/mips/Kconfig	2006-08-25 11:34:25.000000000 -0700
@@ -1432,47 +1432,20 @@ config 64BIT
 
 endchoice
 
-choice
-	prompt "Kernel page size"
-	default PAGE_SIZE_4KB
-
-config PAGE_SIZE_4KB
-	bool "4kB"
-	help
-	 This option select the standard 4kB Linux page size.  On some
-	 R3000-family processors this is the only available page size.  Using
-	 4kB page size will minimize memory consumption and is therefore
-	 recommended for low memory systems.
-
-config PAGE_SIZE_8KB
-	bool "8kB"
+config MIPS_PAGE_SIZE_8KB
+	def_bool y
 	depends on EXPERIMENTAL && CPU_R8000
-	help
-	  Using 8kB page size will result in higher performance kernel at
-	  the price of higher memory consumption.  This option is available
-	  only on the R8000 processor.  Not that at the time of this writing
-	  this option is still high experimental; there are also issues with
-	  compatibility of user applications.
 
-config PAGE_SIZE_16KB
-	bool "16kB"
+config MIPS_PAGE_SIZE_16KB
+	def_bool y
 	depends on !CPU_R3000 && !CPU_TX39XX
-	help
-	  Using 16kB page size will result in higher performance kernel at
-	  the price of higher memory consumption.  This option is available on
-	  all non-R3000 family processors.  Note that you will need a suitable
-	  Linux distribution to support this.
 
-config PAGE_SIZE_64KB
-	bool "64kB"
+config MIPS_PAGE_SIZE_64KB
+	def_bool y
 	depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX
-	help
-	  Using 64kB page size will result in higher performance kernel at
-	  the price of higher memory consumption.  This option is available on
-	  all non-R3000 family processor.  Not that at the time of this
-	  writing this option is still high experimental.
 
-endchoice
+config ARCH_GENERIC_PAGE_SIZE
+	def_bool y
 
 config BOARD_SCACHE
 	bool
diff -puN mm/Kconfig~mips mm/Kconfig
--- threadalloc/mm/Kconfig~mips	2006-08-25 11:34:24.000000000 -0700
+++ threadalloc-dave/mm/Kconfig	2006-08-25 11:34:25.000000000 -0700
@@ -6,6 +6,7 @@
 choice
 	prompt "Kernel Page Size"
 	depends on ARCH_GENERIC_PAGE_SIZE
+	default PAGE_SIZE_4KB if MIPS
 	default PAGE_SIZE_8KB if SPARC64
 	default PAGE_SIZE_16KB if IA64
 config PAGE_SIZE_4KB
@@ -26,13 +27,13 @@ config PAGE_SIZE_4KB
 	  Otherwise, choose 4KB.
 config PAGE_SIZE_8KB
 	bool "8KB"
-	depends on IA64 || SPARC64
+	depends on IA64 || SPARC64 || MIPS_PAGE_SIZE_8KB
 config PAGE_SIZE_16KB
 	bool "16KB"
-	depends on IA64
+	depends on IA64 || MIPS_PAGE_SIZE_16KB
 config PAGE_SIZE_64KB
 	bool "64KB"
-	depends on (IA64 && !ITANIUM) || SPARC64
+	depends on (IA64 && !ITANIUM) || SPARC64 || MIPS_PAGE_SIZE_64KB
 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>

  parent reply	other threads:[~2006-08-28 15:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-28 15:44 [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2) Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 2/7] ia64 generic PAGE_SIZE Dave Hansen
2006-08-28 17:04   ` Christoph Lameter
2006-08-28 17:22     ` Dave Hansen
2006-08-28 17:32       ` Christoph Lameter
2006-08-28 17:45         ` Dave Hansen
2006-08-29  2:46   ` [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2) Paul Mundt
2006-08-29  3:51     ` Randy.Dunlap
2006-08-29  3:55       ` Paul Mundt
2006-08-29  4:02         ` Randy.Dunlap
2006-08-29 15:29     ` Dave Hansen
2006-08-30  0:37       ` Randy.Dunlap
2006-08-28 15:44 ` [RFC][PATCH 3/7] sparc64 generic PAGE_SIZE Dave Hansen
2006-08-28 15:44 ` Dave Hansen [this message]
2006-08-28 15:44 ` [RFC][PATCH 6/7] powerpc " Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 5/7] parisc " Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 7/7] convert the "easy" architectures to " Dave Hansen
2006-08-28 17:01 ` [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2) Christoph Lameter
2006-08-28 17:11   ` Dave Hansen
2006-08-28 23:32     ` Peter Chubb
2006-08-29 18:59       ` Dave Hansen
2006-08-28 20:53   ` Dave Hansen
2006-08-28 21:44     ` Christoph Lameter

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=20060828154415.59858A5A@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox