public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	Christoph Hellwig <hch@infradead.org>,
	Marcelo Tosatti <marcelo@kvack.org>,
	Arjan van de Ven <arjan@infradead.org>,
	Martin Bligh <mbligh@google.com>,
	Christoph Lameter <clameter@sgi.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Andi Kleen <ak@suse.de>
Subject: [RFC 6/8] i386 without ZONE_DMA
Date: Fri, 7 Jul 2006 17:05:32 -0700 (PDT)	[thread overview]
Message-ID: <20060708000532.3829.13046.sendpatchset@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20060708000501.3829.25578.sendpatchset@schroedinger.engr.sgi.com>

i386: Optional ZONE_DMA

ZONE_DMA depends on GENERIC_ISA_DMA. We allow the user to configure
GENERIC_ISA_DMA. If it is switched off then we buid a kernel without
ZONE_DMA.

Note that this patch is incomplete: All device drivers that use GENERIC_ISA_DMA
need to depend on it. This was not tested for i386 NUMA and other miscalleneous
configuration. But it works on my desktop (dual core Pentium).

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6.17-mm6/arch/i386/kernel/setup.c
===================================================================
--- linux-2.6.17-mm6.orig/arch/i386/kernel/setup.c	2006-07-07 09:01:12.000000000 -0700
+++ linux-2.6.17-mm6/arch/i386/kernel/setup.c	2006-07-07 16:21:53.000000000 -0700
@@ -1207,15 +1207,19 @@ void __init zone_sizes_init(void)
 	max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
 	low = max_low_pfn;
 
+#ifdef CONFIG_ZONE_DMA
 	if (low < max_dma)
 		zones_size[ZONE_DMA] = low;
 	else {
 		zones_size[ZONE_DMA] = max_dma;
 		zones_size[ZONE_NORMAL] = low - max_dma;
+	}
+#else
+	zones_size[ZONE_NORMAL] = low;
+#endif
 #ifdef CONFIG_HIGHMEM
-		zones_size[ZONE_HIGHMEM] = highend_pfn - low;
+	zones_size[ZONE_HIGHMEM] = highend_pfn - low;
 #endif
-	}
 	free_area_init(zones_size);
 }
 #else
Index: linux-2.6.17-mm6/arch/i386/Kconfig
===================================================================
--- linux-2.6.17-mm6.orig/arch/i386/Kconfig	2006-07-07 16:15:10.000000000 -0700
+++ linux-2.6.17-mm6/arch/i386/Kconfig	2006-07-07 16:18:57.000000000 -0700
@@ -41,10 +41,6 @@ config MMU
 config SBUS
 	bool
 
-config GENERIC_ISA_DMA
-	bool
-	default y
-
 config GENERIC_IOMAP
 	bool
 	default y
@@ -344,6 +340,15 @@ config VM86
           XFree86 to initialize some video cards via BIOS. Disabling this
           option saves about 6k.
 
+config GENERIC_ISA_DMA
+	bool "ISA DMA zone (to support ISA legacy DMA)"
+	default y
+	help
+	  If DMA for ISA boards needs to be supported then this option
+	  needs to be enabled. An additional DMA zone for <16MB memory
+	  will be created and memory below 16MB will be used for those
+	  devices.
+
 config TOSHIBA
 	tristate "Toshiba Laptop support"
 	---help---
Index: linux-2.6.17-mm6/arch/i386/kernel/Makefile
===================================================================
--- linux-2.6.17-mm6.orig/arch/i386/kernel/Makefile	2006-07-07 16:16:19.000000000 -0700
+++ linux-2.6.17-mm6/arch/i386/kernel/Makefile	2006-07-07 16:17:16.000000000 -0700
@@ -7,8 +7,9 @@ extra-y := head.o init_task.o vmlinux.ld
 obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 		ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
 		pci-dma.o i386_ksyms.o i387.o bootflag.o \
-		quirks.o i8237.o topology.o alternative.o i8253.o tsc.o
+		quirks.o topology.o alternative.o i8253.o tsc.o
 
+obj-$(CONFIG_GENERIC_ISA_DMA)	+= i8237.o
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
 obj-y				+= cpu/
 obj-y				+= acpi/

  parent reply	other threads:[~2006-07-08  0:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08  0:05 [RFC 0/8] Optional ZONE_DMA Christoph Lameter
2006-07-08  0:05 ` [RFC 1/8] Add CONFIG_ZONE_DMA to all archesM Christoph Lameter
2006-07-10  0:52   ` KAMEZAWA Hiroyuki
2006-07-10 15:56     ` Christoph Lameter
2006-07-11  7:11       ` KAMEZAWA Hiroyuki
2006-07-08  0:05 ` [RFC 2/8] slab allocator: Make DMA support configurable Christoph Lameter
2006-07-08  0:05 ` [RFC 3/8] eventcounters: Optional ZONE_DMA Christoph Lameter
2006-07-08  0:05 ` [RFC 4/8] page allocator: " Christoph Lameter
2006-07-08  0:23   ` Andi Kleen
2006-07-08  0:41     ` Christoph Lameter
2006-07-08  0:05 ` [RFC 5/8] x86_64 without ZONE_DMA Christoph Lameter
2006-07-08  0:20   ` Andi Kleen
2006-07-08  0:42     ` Christoph Lameter
2006-07-08  1:00       ` Andi Kleen
2006-07-08  1:25         ` Christoph Lameter
2006-07-08  0:05 ` Christoph Lameter [this message]
2006-07-08  0:05 ` [RFC 7/8] Single zone optimizations Christoph Lameter
2006-07-08  0:19   ` Andi Kleen
2006-07-08  0:05 ` [RFC 8/8] Optimize mempolicies for a single zone Christoph Lameter
2006-07-08  0:17   ` Andi Kleen

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=20060708000532.3829.13046.sendpatchset@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=ak@suse.de \
    --cc=arjan@infradead.org \
    --cc=hch@infradead.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@kvack.org \
    --cc=mbligh@google.com \
    --cc=nickpiggin@yahoo.com.au \
    /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