mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: lkml <linux-kernel@vger.kernel.org>
Cc: akpm <akpm@osdl.org>, torvalds <torvalds@osdl.org>,
	geert@linux-m68k.org, zippel@linux-m68k.org, wli@holomorphy.com
Subject: [PATCH 8/9] Replace __ARCH_HAS_NO_PAGE_ZERO_MAPPED with CONFIG_NO_PAGE_ZERO_MAPPED
Date: Mon, 7 Aug 2006 14:07:58 -0700	[thread overview]
Message-ID: <20060807140758.aea1de6c.rdunlap@xenotime.net> (raw)
In-Reply-To: <20060807120928.c0fe7045.rdunlap@xenotime.net>

From: Randy Dunlap <rdunlap@xenotime.net>

Replace __ARCH_HAS_NO_PAGE_ZERO_MAPPED with CONFIG_NO_PAGE_ZERO_MAPPED.
Move it from header files to Kconfig space.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 arch/m68k/Kconfig      |    3 +++
 arch/sparc/Kconfig     |    3 +++
 drivers/char/mem.c     |    8 ++++----
 include/asm-m68k/io.h  |    2 --
 include/asm-sparc/io.h |    2 --
 5 files changed, 10 insertions(+), 8 deletions(-)

--- linux-2618-rc4-arch.orig/drivers/char/mem.c
+++ linux-2618-rc4-arch/drivers/char/mem.c
@@ -115,7 +115,7 @@ static ssize_t read_mem(struct file * fi
 	if (!valid_phys_addr_range(p, count))
 		return -EFAULT;
 	read = 0;
-#ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
+#ifdef CONFIG_NO_PAGE_ZERO_MAPPED
 	/* we don't have page 0 mapped on sparc and m68k.. */
 	if (p < PAGE_SIZE) {
 		sz = PAGE_SIZE - p;
@@ -175,7 +175,7 @@ static ssize_t write_mem(struct file * f
 
 	written = 0;
 
-#ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
+#ifdef CONFIG_NO_PAGE_ZERO_MAPPED
 	/* we don't have page 0 mapped on sparc and m68k.. */
 	if (p < PAGE_SIZE) {
 		unsigned long sz = PAGE_SIZE - p;
@@ -333,7 +333,7 @@ static ssize_t read_kmem(struct file *fi
 		if (count > (unsigned long) high_memory - p)
 			low_count = (unsigned long) high_memory - p;
 
-#ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
+#ifdef CONFIG_NO_PAGE_ZERO_MAPPED
 		/* we don't have page 0 mapped on sparc and m68k.. */
 		if (p < PAGE_SIZE && low_count > 0) {
 			size_t tmp = PAGE_SIZE - p;
@@ -411,7 +411,7 @@ do_write_kmem(void *p, unsigned long rea
 	unsigned long copied;
 
 	written = 0;
-#ifdef __ARCH_HAS_NO_PAGE_ZERO_MAPPED
+#ifdef CONFIG_NO_PAGE_ZERO_MAPPED
 	/* we don't have page 0 mapped on sparc and m68k.. */
 	if (realp < PAGE_SIZE) {
 		unsigned long sz = PAGE_SIZE - realp;
--- linux-2618-rc4-arch.orig/include/asm-m68k/io.h
+++ linux-2618-rc4-arch/include/asm-m68k/io.h
@@ -360,8 +360,6 @@ extern void dma_cache_inv(unsigned long 
 
 #endif /* __KERNEL__ */
 
-#define __ARCH_HAS_NO_PAGE_ZERO_MAPPED		1
-
 /*
  * Convert a physical pointer to a virtual kernel pointer for /dev/mem
  * access
--- linux-2618-rc4-arch.orig/include/asm-sparc/io.h
+++ linux-2618-rc4-arch/include/asm-sparc/io.h
@@ -290,8 +290,6 @@ extern void sbus_iounmap(volatile void _
 
 #endif
 
-#define __ARCH_HAS_NO_PAGE_ZERO_MAPPED		1
-
 /*
  * Convert a physical pointer to a virtual kernel pointer for /dev/mem
  * access
--- linux-2618-rc4-arch.orig/arch/m68k/Kconfig
+++ linux-2618-rc4-arch/arch/m68k/Kconfig
@@ -366,6 +366,9 @@ config 060_WRITETHROUGH
 	  is hardwired on.  The 53c710 SCSI driver is known to suffer from
 	  this problem.
 
+config NO_PAGE_ZERO_MAPPED
+	def_bool y
+
 source "mm/Kconfig"
 
 endmenu
--- linux-2618-rc4-arch.orig/arch/sparc/Kconfig
+++ linux-2618-rc4-arch/arch/sparc/Kconfig
@@ -229,6 +229,9 @@ config SUNOS_EMUL
 
 source "mm/Kconfig"
 
+config NO_PAGE_ZERO_MAPPED
+	def_bool y
+
 endmenu
 
 source "net/Kconfig"


---

  parent reply	other threads:[~2006-08-07 21:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060807120928.c0fe7045.rdunlap@xenotime.net>
2006-08-07 20:58 ` [PATCH 3/9] Replace ARCH_HAS_READ_CURRENT_TIMER with CONFIG_ARCH_READ_CURRENT_TIMER Randy.Dunlap
2006-08-07 21:00 ` [PATCH 4/9] Replace ARCH_HAS_NMI_WATCHDOG with CONFIG_ARCH_NMI_WATCHDOG Randy.Dunlap
2006-08-07 21:04 ` [PATCH 6/9] Replace ARCH_HAS_SOCKET_TYPES with CONFIG_ARCH_SOCKET_TYPES Randy.Dunlap
2006-08-07 21:05 ` [PATCH 7/9] Replace ARCH_HAS_VALID_PHYS_ADDR_RANGE with CONFIG_ARCH_VALID_PHYS_ADDR_RANGE Randy.Dunlap
2006-08-07 21:07 ` Randy.Dunlap [this message]
2006-08-07 21:09 ` [PATCH 9/9] Replace ARCH_HAS_POWER_INIT with CONFIG_ACPI_POWER_INIT Randy.Dunlap
2006-08-07 21:10 ` [PATCH 5/9] Replace ARCH_HAS_FLUSH_ANON_PAGE with CONFIG_ARCH_FLUSH_ANON_PAGE Randy.Dunlap
2006-08-08  8:52   ` Christoph Hellwig
2006-08-08 14:17     ` Kyle McMartin
2006-08-08 15:56     ` Randy.Dunlap
2006-08-07 21:11 ` [PATCH 2/9] Replace __ARCH_HAS_DO_SOFTIRQ with CONFIG_ARCH_DO_SOFTIRQ Randy.Dunlap
2006-08-08  8:29   ` Martin Schwidefsky
2006-08-07 21:12 ` [PATCH 1/9] Replace ARCH_HAS_SCHED_WAKE_IDLE with CONFIG_SCHED_SMT Randy.Dunlap

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=20060807140758.aea1de6c.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=akpm@osdl.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=wli@holomorphy.com \
    --cc=zippel@linux-m68k.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

all inboxes | Powered by JetHome®