[PATCH] Set CONFIG_ZONE_DMA for arches with GENERIC_ISA_DMA
As Andi pointed out: CONFIG_GENERIC_ISA_DMA only disables the ISA DMA
channel management. Other functionality may still expect GFP_DMA to
provide memory below 16M. So we need to make sure that CONFIG_ZONE_DMA is
set independent of CONFIG_GENERIC_ISA_DMA. Undo the modifications to
mm/Kconfig where we made ZONE_DMA dependent on GENERIC_ISA_DMA and set
theses explicitly in each arches Kconfig.
Reviews must occur for each arch in order to determine if ZONE_DMA can be
switched off. It can only be switched off if we know that all devices
supported by a platform are capable of performing DMA transfers to all of
memory (Some arches already support this: uml, avr32, sh sh64, parisc and
IA64/Altix).
In order to switch ZONE_DMA off conditionally, one would have to establish
a scheme by which one can assure that no drivers are enabled that are only
capable of doing I/O to a part of memory, or one needs to provide an
alternate means of performing an allocation from a specific range of memory
(like provided by alloc_pages_range()) and insure that all drivers use that
call. In that case the arches alloc_dma_coherent() may need to be modified
to call alloc_pages_range() instead of relying on GFP_DMA.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 84caf50..770f717 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -41,6 +41,10 @@
bool
default y
+config ZONE_DMA
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
default y
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1523046e..fbf4b2a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -100,6 +100,10 @@
config ARCH_MAY_HAVE_PC_FDC
bool
+config ZONE_DMA
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig
index 74eba8b..989113d 100644
--- a/arch/arm26/Kconfig
+++ b/arch/arm26/Kconfig
@@ -60,6 +60,10 @@
config GENERIC_BUST_SPINLOCK
bool
+config ZONE_DMA
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 0dfee81..63d5e84 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -38,6 +38,10 @@
bool
default y
+config ZONE_DMA
+ bool
+ default y
+
config SBUS
bool
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index f383dab..565d013 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -16,6 +16,10 @@
bool
default y
+config ZONE_DMA
+ bool
+ default y
+
config GENERIC_HARDIRQS
bool
default y
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 70a577c..0bffbe6 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -439,6 +439,10 @@
depends on Q40 || AMIGA_PCMCIA || GG2
default y
+config ZONE_DMA
+ bool
+ default y
+
source "drivers/pci/Kconfig"
source "drivers/zorro/Kconfig"
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 9d839a9..1bc6d24 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -8,6 +8,10 @@
menu "Machine selection"
+config ZONE_DMA
+ bool
+ default y
+
choice
prompt "System type"
default SGI_IP22
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index f08e80a..0088c5e 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -977,6 +977,10 @@
have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If
you have an embedded board, consult your board documentation.
+config ZONE_DMA
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
depends on PPC64 || POWER4 || 6xx && !CPM2
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index c22e606..0df9c33 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1177,6 +1177,10 @@
have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If
you have an embedded board, consult your board documentation.
+config ZONE_DMA
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
depends on 6xx && !CPM2
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index d0dec1e..bd992c0 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -13,6 +13,10 @@
bool
default y
+config ZONE_DMA
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
default y
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index d41f66a..fb84647 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -232,6 +232,10 @@
source "mm/Kconfig"
+config ZONE_DMA
+ bool
+ default y
+
config GENERIC_ISA_DMA
bool
default y
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index d427553..02dd394 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -44,6 +44,10 @@
bool
default y
+config ZONE_DMA
+ bool
+ default y
+
config ISA
bool