Skip to content

Commit

Permalink
[PATCH] Set CONFIG_ZONE_DMA for arches with GENERIC_ISA_DMA
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Feb 11, 2007
1 parent 339ba9b commit 5ac6da6
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 4 deletions.
4 changes: 4 additions & 0 deletions arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ config GENERIC_CALIBRATE_DELAY
bool
default y

config ZONE_DMA
bool
default y

config GENERIC_ISA_DMA
bool
default y
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ config GENERIC_BUST_SPINLOCK
config ARCH_MAY_HAVE_PC_FDC
bool

config ZONE_DMA
bool
default y

config GENERIC_ISA_DMA
bool

Expand Down
4 changes: 4 additions & 0 deletions arch/arm26/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ config GENERIC_CALIBRATE_DELAY
config GENERIC_BUST_SPINLOCK
bool

config ZONE_DMA
bool
default y

config GENERIC_ISA_DMA
bool

Expand Down
4 changes: 4 additions & 0 deletions arch/i386/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ config MMU
bool
default y

config ZONE_DMA
bool
default y

config SBUS
bool

Expand Down
4 changes: 4 additions & 0 deletions arch/m32r/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ config GENERIC_ISA_DMA
bool
default y

config ZONE_DMA
bool
default y

config GENERIC_HARDIRQS
bool
default y
Expand Down
4 changes: 4 additions & 0 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ config GENERIC_ISA_DMA
depends on Q40 || AMIGA_PCMCIA || GG2
default y

config ZONE_DMA
bool
default y

source "drivers/pci/Kconfig"

source "drivers/zorro/Kconfig"
Expand Down
4 changes: 4 additions & 0 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ mainmenu "Linux/MIPS Kernel Configuration"

menu "Machine selection"

config ZONE_DMA
bool
default y

choice
prompt "System type"
default SGI_IP22
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,10 @@ config ISA
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
Expand Down
4 changes: 4 additions & 0 deletions arch/ppc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,10 @@ config ISA
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
Expand Down
4 changes: 4 additions & 0 deletions arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ config HIGHMEM
bool
default y

config ZONE_DMA
bool
default y

config GENERIC_ISA_DMA
bool
default y
Expand Down
4 changes: 4 additions & 0 deletions arch/sparc64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ config LARGE_ALLOCS

source "mm/Kconfig"

config ZONE_DMA
bool
default y

config GENERIC_ISA_DMA
bool
default y
Expand Down
4 changes: 4 additions & 0 deletions arch/x86_64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ config MMU
bool
default y

config ZONE_DMA
bool
default y

config ISA
bool

Expand Down
4 changes: 0 additions & 4 deletions mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ config SPLIT_PTLOCK_CPUS
default "4096" if PARISC && !PA20
default "4"

config ZONE_DMA
def_bool y
depends on GENERIC_ISA_DMA

#
# support for page migration
#
Expand Down

0 comments on commit 5ac6da6

Please sign in to comment.