optional ZONE_DMA
Subsystems (7)
PATCH 2/2 optional ZONE_DMA
The following patch turns ZONE_DMA into a configurable option on x86.
It also adds "select ZONE_DMA" entries in corresponding Kconfig files for in-tree PCI drivers which have <32bit addressing limitation.
Comments?
arch/i386/Kconfig +14 -4
@@ -46,10 +46,6 @@ bool default y -config ZONE_DMA - bool - default y - config SBUS bool
@@ -584,6 +580,18 @@ default y select RESOURCES_64BIT +config ZONE_DMA + bool "DMA zone support" + default y + help + This enables support for the 16MiB DMA zone. Only disable this + option if you are _absolutely_ sure that your devices contain + no DMA addressing limitations. + + Note: disabling this option erroneously will cause random memory + corruption. + + # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support"
@@ -1146,6 +1154,7 @@ config GENERIC_ISA_DMA bool "ISA DMA API" select ISA_DMA_API + select ZONE_DMA default y help This enables support for the ISA DMA API.
@@ -1174,6 +1183,7 @@ config MCA bool "MCA support" if !(X86_VISWS || X86_VOYAGER) default y if X86_VOYAGER + select ZONE_DMA help MicroChannel Architecture is found in some IBM PS/2 machines and laptops. It is a bus system similar to PCI or ISA. See
arch/i386/kernel/setup.c +2 -0
@@ -372,8 +372,10 @@ {unsigned long max_zone_pfns[MAX_NR_ZONES ];memset (max_zone_pfns,0 ,sizeof (max_zone_pfns)); +#ifdef CONFIG_ZONE_DMA max_zone_pfns[ZONE_DMA ] =virt_to_phys ((char *)MAX_DMA_ADDRESS ) >>PAGE_SHIFT ; +#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;#ifdef CONFIG_HIGHMEM max_zone_pfns[ZONE_HIGHMEM ] = highend_pfn;
drivers/block/Kconfig +1 -1
@@ -8,7 +8,7 @@ config BLK_DEV_FD tristate "Normal floppy disk support" - depends on ARCH_MAY_HAVE_PC_FDC + depends on ARCH_MAY_HAVE_PC_FDC && GENERIC_ISA_DMA ---help--- If you want to use the floppy disk drive(s) of your PC under Linux, say Y. Information about this driver, especially important for IBM
drivers/net/Kconfig +1 -0
@@ -1400,6 +1400,7 @@ tristate "Broadcom 4400 ethernet support" depends on NET_PCI && PCI select MII + select ZONE_DMA help If you have a network (Ethernet) controller of this type, say Y and read the Ethernet-HOWTO, available from
drivers/net/wan/Kconfig +1 -0
@@ -186,6 +186,7 @@ config WANXL tristate "SBE Inc. wanXL support" depends on HDLC && PCI + select ZONE_DMA help Driver for wanXL PCI cards by SBE Inc.
drivers/net/wireless/bcm43xx/Kconfig +1 -0
@@ -3,6 +3,7 @@ depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && NET_RADIO && EXPERIMENTAL select FW_LOADER select HW_RANDOM + select ZONE_DMA ---help--- This is an experimental driver for the Broadcom 43xx wireless chip, found in the Apple Airport Extreme and various other devices.
drivers/scsi/Kconfig +1 -0
@@ -413,6 +413,7 @@ config SCSI_AACRAID tristate "Adaptec AACRAID support" depends on SCSI && PCI + select ZONE_DMA help This driver supports a variety of Dell, HP, Adaptec, IBM and ICP storage products. For a list of supported products, refer
drivers/usb/host/Kconfig +1 -0
@@ -7,6 +7,7 @@ config USB_EHCI_HCD tristate "EHCI HCD (USB 2.0) support" depends on USB && USB_ARCH_HAS_EHCI + select ZONE_DMA if (X86 && VMSPLIT_1G) ---help--- The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
sound/pci/Kconfig +12 -0
@@ -21,6 +21,7 @@ select SND_PCM select SND_AC97_CODEC select SND_OPL3_LIB + select ZONE_DMA help Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+
@@ -33,6 +34,7 @@ select SND_OPL3_LIB select SND_MPU401_UART select SND_PCM + select ZONE_DMA help Say Y here to include support for soundcards based on Avance Logic ALS4000 chips.
@@ -45,6 +47,7 @@ depends on SND select SND_MPU401_UART select SND_AC97_CODEC + select ZONE_DMA help Say Y here to include support for the integrated AC97 sound device on motherboards using the ALi M5451 Audio Controller
@@ -127,6 +130,7 @@ select SND_OPL3_LIB select SND_MPU401_UART select SND_PCM + select ZONE_DMA help Say Y here to include support for Aztech AZF3328 (PCI168) soundcards.
@@ -377,6 +381,7 @@ select SND_HWDEP select SND_RAWMIDI select SND_AC97_CODEC + select ZONE_DMA help Say Y to include support for Sound Blaster PCI 512, Live!, Audigy and E-mu APS (partially supported) soundcards.
@@ -393,6 +398,7 @@ depends on SND select SND_AC97_CODEC select SND_RAWMIDI + select ZONE_DMA help Say Y here to include support for the Dell OEM version of the Sound Blaster Live!.
@@ -429,6 +435,7 @@ select SND_OPL3_LIB select SND_MPU401_UART select SND_AC97_CODEC + select ZONE_DMA help Say Y here to include support for soundcards based on ESS Solo-1 (ES1938, ES1946, ES1969) chips.
@@ -441,6 +448,7 @@ depends on SND select SND_MPU401_UART select SND_AC97_CODEC + select ZONE_DMA help Say Y here to include support for soundcards based on ESS Maestro 1/2/2E chips.
@@ -520,6 +528,7 @@ depends on SND select SND_MPU401_UART select SND_AC97_CODEC + select ZONE_DMA help Say Y here to include support for soundcards based on the ICE1712 (Envy24) chip.
@@ -589,6 +598,7 @@ depends on SND select FW_LOADER select SND_AC97_CODEC + select ZONE_DMA help Say Y here to include support for soundcards based on ESS Maestro 3 (Allegro) chips.
@@ -682,6 +692,7 @@ select SND_OPL3_LIB select SND_MPU401_UART select SND_AC97_CODEC + select ZONE_DMA help Say Y here to include support for soundcards based on the S3 SonicVibes chip.
@@ -694,6 +705,7 @@ depends on SND select SND_MPU401_UART select SND_AC97_CODEC + select ZONE_DMA help Say Y here to include support for soundcards based on Trident 4D-Wave DX/NX or SiS 7018 chips.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Marcelo Tosatti
The following patch turns
ZONE_DMAinto a configurable option on x86.It also adds "select
ZONE_DMA" entries in correspondingKconfigfiles for in-tree PCI drivers which have <32bit addressing limitation.
this select probably only works if all PCI architectures provide a ZONE_DMA config option...
Signature · 8 lines
if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 1 line · Marcelo Tosatti
Comments?
Great! Yes that is what I would like to see for x86. The general problem that Andi saw was that ZONE_DMA is not only used by device drivers (where we could add an explicit dependency) but also by subsystems for various nefarious purposes (f.e. SCSI). Maybe Andi can give us some more clarity on that issue?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>