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 Index: linux-2.6.18-rc1-mm1/arch/i386/kernel/setup.c =================================================================== --- linux-2.6.18-rc1-mm1.orig/arch/i386/kernel/setup.c 2006-07-10 10:33:41.638305144 -0700 +++ linux-2.6.18-rc1-mm1/arch/i386/kernel/setup.c 2006-07-10 11:13:53.043755570 -0700 @@ -1208,15 +1208,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.18-rc1-mm1/arch/i386/Kconfig =================================================================== --- linux-2.6.18-rc1-mm1.orig/arch/i386/Kconfig 2006-07-10 10:33:41.617798603 -0700 +++ linux-2.6.18-rc1-mm1/arch/i386/Kconfig 2006-07-10 11:13:53.065238617 -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.18-rc1-mm1/arch/i386/kernel/Makefile =================================================================== --- linux-2.6.18-rc1-mm1.orig/arch/i386/kernel/Makefile 2006-07-05 21:09:49.000000000 -0700 +++ linux-2.6.18-rc1-mm1/arch/i386/kernel/Makefile 2006-07-10 11:13:53.076956643 -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/