diff options
author | Muli Ben-Yehuda <mulix@mulix.org> | 2006-01-11 16:44:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 22:04:55 -0500 |
commit | 17a941d854a3f7b0bb916fdeee4c9ffdcc19d8d3 (patch) | |
tree | b6b3b55318336adf769bf57141a01a9defbbb202 /arch/x86_64/Kconfig | |
parent | 8a6fdd3e912e0ce6f723431d66baf704bf8a1d26 (diff) |
[PATCH] x86_64: Use function pointers to call DMA mapping functions
AK: I hacked Muli's original patch a lot and there were a lot
of changes - all bugs are probably to blame on me now.
There were also some changes in the fall back behaviour
for swiotlb - in particular it doesn't try to use GFP_DMA
now anymore. Also all DMA mapping operations use the
same core dma_alloc_coherent code with proper fallbacks now.
And various other changes and cleanups.
Known problems: iommu=force swiotlb=force together breaks
needs more testing.
This patch cleans up x86_64's DMA mapping dispatching code. Right now
we have three possible IOMMU types: AGP GART, swiotlb and nommu, and
in the future we will also have Xen's x86_64 swiotlb and other HW
IOMMUs for x86_64. In order to support all of them cleanly, this
patch:
- introduces a struct dma_mapping_ops with function pointers for each
of the DMA mapping operations of gart (AMD HW IOMMU), swiotlb
(software IOMMU) and nommu (no IOMMU).
- gets rid of:
if (swiotlb)
return swiotlb_xxx();
- PCI_DMA_BUS_IS_PHYS is now checked against the dma_ops being set
This makes swiotlb faster by avoiding double copying in some cases.
Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
Signed-Off-By: Jon D. Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/Kconfig')
-rw-r--r-- | arch/x86_64/Kconfig | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 150e1ac0bfed..ee053e32a721 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -351,32 +351,24 @@ config HPET_EMULATE_RTC | |||
351 | depends on HPET_TIMER && RTC=y | 351 | depends on HPET_TIMER && RTC=y |
352 | 352 | ||
353 | config GART_IOMMU | 353 | config GART_IOMMU |
354 | bool "IOMMU support" | 354 | bool "K8 GART IOMMU support" |
355 | default y | 355 | default y |
356 | select SWIOTLB | ||
356 | depends on PCI | 357 | depends on PCI |
357 | help | 358 | help |
358 | Support the IOMMU. Needed to run systems with more than 3GB of memory | 359 | Support the IOMMU. Needed to run systems with more than 3GB of memory |
359 | properly with 32-bit PCI devices that do not support DAC (Double Address | 360 | properly with 32-bit PCI devices that do not support DAC (Double Address |
360 | Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter. | 361 | Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter. |
361 | Normally the kernel will take the right choice by itself. | 362 | Normally the kernel will take the right choice by itself. |
362 | This option includes a driver for the AMD Opteron/Athlon64 IOMMU | 363 | This option includes a driver for the AMD Opteron/Athlon64 northbridge IOMMU |
363 | and a software emulation used on some other systems. | 364 | and a software emulation used on other systems. |
364 | If unsure, say Y. | 365 | If unsure, say Y. |
365 | 366 | ||
366 | # need this always enabled with GART_IOMMU for the VIA workaround | 367 | # need this always enabled with GART_IOMMU for the VIA workaround |
367 | config SWIOTLB | 368 | config SWIOTLB |
368 | bool | ||
369 | depends on GART_IOMMU | ||
370 | default y | ||
371 | |||
372 | config DUMMY_IOMMU | ||
373 | bool | 369 | bool |
374 | depends on !GART_IOMMU && !SWIOTLB | ||
375 | default y | 370 | default y |
376 | help | 371 | depends on GART_IOMMU |
377 | Don't use IOMMU code. This will cause problems when you have more than 4GB | ||
378 | of memory and any 32-bit devices. Don't turn on unless you know what you | ||
379 | are doing. | ||
380 | 372 | ||
381 | config X86_MCE | 373 | config X86_MCE |
382 | bool "Machine check support" if EMBEDDED | 374 | bool "Machine check support" if EMBEDDED |