Commit 5ac6da669e2476dbdac89b357b05b5a79bc5b657

Authored by Christoph Lameter
Committed by Linus Torvalds
1 parent 339ba9b15d

[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>

Showing 13 changed files with 48 additions and 4 deletions Side-by-side Diff

... ... @@ -41,6 +41,10 @@
41 41 bool
42 42 default y
43 43  
  44 +config ZONE_DMA
  45 + bool
  46 + default y
  47 +
44 48 config GENERIC_ISA_DMA
45 49 bool
46 50 default y
... ... @@ -100,6 +100,10 @@
100 100 config ARCH_MAY_HAVE_PC_FDC
101 101 bool
102 102  
  103 +config ZONE_DMA
  104 + bool
  105 + default y
  106 +
103 107 config GENERIC_ISA_DMA
104 108 bool
105 109  
... ... @@ -60,6 +60,10 @@
60 60 config GENERIC_BUST_SPINLOCK
61 61 bool
62 62  
  63 +config ZONE_DMA
  64 + bool
  65 + default y
  66 +
63 67 config GENERIC_ISA_DMA
64 68 bool
65 69  
... ... @@ -38,6 +38,10 @@
38 38 bool
39 39 default y
40 40  
  41 +config ZONE_DMA
  42 + bool
  43 + default y
  44 +
41 45 config SBUS
42 46 bool
43 47  
... ... @@ -16,6 +16,10 @@
16 16 bool
17 17 default y
18 18  
  19 +config ZONE_DMA
  20 + bool
  21 + default y
  22 +
19 23 config GENERIC_HARDIRQS
20 24 bool
21 25 default y
... ... @@ -439,6 +439,10 @@
439 439 depends on Q40 || AMIGA_PCMCIA || GG2
440 440 default y
441 441  
  442 +config ZONE_DMA
  443 + bool
  444 + default y
  445 +
442 446 source "drivers/pci/Kconfig"
443 447  
444 448 source "drivers/zorro/Kconfig"
... ... @@ -8,6 +8,10 @@
8 8  
9 9 menu "Machine selection"
10 10  
  11 +config ZONE_DMA
  12 + bool
  13 + default y
  14 +
11 15 choice
12 16 prompt "System type"
13 17 default SGI_IP22
arch/powerpc/Kconfig
... ... @@ -977,6 +977,10 @@
977 977 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If
978 978 you have an embedded board, consult your board documentation.
979 979  
  980 +config ZONE_DMA
  981 + bool
  982 + default y
  983 +
980 984 config GENERIC_ISA_DMA
981 985 bool
982 986 depends on PPC64 || POWER4 || 6xx && !CPM2
... ... @@ -1177,6 +1177,10 @@
1177 1177 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If
1178 1178 you have an embedded board, consult your board documentation.
1179 1179  
  1180 +config ZONE_DMA
  1181 + bool
  1182 + default y
  1183 +
1180 1184 config GENERIC_ISA_DMA
1181 1185 bool
1182 1186 depends on 6xx && !CPM2
... ... @@ -13,6 +13,10 @@
13 13 bool
14 14 default y
15 15  
  16 +config ZONE_DMA
  17 + bool
  18 + default y
  19 +
16 20 config GENERIC_ISA_DMA
17 21 bool
18 22 default y
arch/sparc64/Kconfig
... ... @@ -232,6 +232,10 @@
232 232  
233 233 source "mm/Kconfig"
234 234  
  235 +config ZONE_DMA
  236 + bool
  237 + default y
  238 +
235 239 config GENERIC_ISA_DMA
236 240 bool
237 241 default y
... ... @@ -44,6 +44,10 @@
44 44 bool
45 45 default y
46 46  
  47 +config ZONE_DMA
  48 + bool
  49 + default y
  50 +
47 51 config ISA
48 52 bool
49 53  
... ... @@ -139,10 +139,6 @@
139 139 default "4096" if PARISC && !PA20
140 140 default "4"
141 141  
142   -config ZONE_DMA
143   - def_bool y
144   - depends on GENERIC_ISA_DMA
145   -
146 142 #
147 143 # support for page migration
148 144 #