]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 5295/1: make ZONE_DMA optional
authorNicolas Pitre <nico@cam.org>
Tue, 7 Oct 2008 19:14:55 +0000 (20:14 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 9 Oct 2008 20:29:46 +0000 (21:29 +0100)
Most ARM machines don't need a special "DMA" memory zone, and
when configured out, the kernel becomes a bit smaller:

|   text    data     bss     dec     hex filename
|3826182  102384  111700 4040266  3da64a vmlinux
|3823593  101616  111700 4036909  3d992d vmlinux.nodmazone

This is because the system now has only one zone total which effect is
to optimize away many conditionals in page allocation paths.

So let's configure this zone only on machines that need split zones.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/Kconfig
arch/arm/common/Kconfig
arch/arm/include/asm/memory.h
arch/arm/mach-pxa/Kconfig

index f5bf38b5f38dbd3b16b09ae906f49c5ffa9ed5ef..ea52fae33290a2d9c2baffab08d58f83407c0c22 100644 (file)
@@ -148,7 +148,6 @@ config ARCH_MAY_HAVE_PC_FDC
 
 config ZONE_DMA
        bool
-       default y
 
 config GENERIC_ISA_DMA
        bool
@@ -357,6 +356,7 @@ config ARCH_IXP4XX
        select GENERIC_GPIO
        select GENERIC_TIME
        select GENERIC_CLOCKEVENTS
+       select ZONE_DMA if PCI
        help
          Support for Intel's IXP4XX (XScale) family of processors.
 
@@ -503,6 +503,7 @@ config ARCH_SHARK
        bool "Shark"
        select ISA
        select ISA_DMA
+       select ZONE_DMA
        select PCI
        help
          Support for the StrongARM based Digital DNARD machine, also known
@@ -524,6 +525,7 @@ config ARCH_DAVINCI
        select GENERIC_CLOCKEVENTS
        select GENERIC_GPIO
        select HAVE_CLK
+       select ZONE_DMA
        help
          Support for TI's DaVinci platform.
 
index 3e073467caca6b63a5515b2bd9afb543ca233e2e..2e32acca02fbb83374c74f67e1fba340cfaa9a2c 100644 (file)
@@ -12,7 +12,8 @@ config ICST307
 
 config SA1111
        bool
-       select DMABOUNCE
+       select DMABOUNCE if !ARCH_PXA
+       select ZONE_DMA if !ARCH_PXA
 
 config DMABOUNCE
        bool
index 7834adbe1774649c87b4582e4ba30eadeb606857..809ff9ab853a5979c0da8fc35a30c6208533d07b 100644 (file)
 
 #ifndef arch_adjust_zones
 #define arch_adjust_zones(node,size,holes) do { } while (0)
+#elif !defined(CONFIG_ZONE_DMA)
+#error "custom arch_adjust_zones() requires CONFIG_ZONE_DMA"
 #endif
 
 /*
index e8ee7ec9ff6dda45d0a0793c9887b37b2592769a..e484f609feda8b1da86ffaeecf3f9243e822bcb8 100644 (file)
@@ -210,6 +210,7 @@ config MACH_ARMCORE
        bool "CompuLab CM-X270 modules"
        select PXA27x
        select IWMMXT
+       select ZONE_DMA if PCI
 
 config MACH_MAGICIAN
        bool "Enable HTC Magician Support"