linux/arch/x86_64/kernel
Muli Ben-Yehuda 17a941d854 [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>
2006-01-11 19:04:55 -08:00
..
acpi [PATCH] x86-64: more gratitious linux/irq.h includes 2005-09-12 10:50:58 -07:00
cpufreq Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
aperture.c [PATCH] x86_64: Fix off by one in IOMMU check 2006-01-11 19:04:54 -08:00
apic.c [PATCH] x86_64: Add idle notifiers 2006-01-11 19:04:55 -08:00
asm-offsets.c [PATCH] x86_64: Implement is_compat_task the right way 2006-01-11 19:04:53 -08:00
crash_dump.c [PATCH] kdump: read previous kernel's memory 2006-01-10 08:01:28 -08:00
crash.c [PATCH] kdump: x86_64 save cpu registers upon crash 2006-01-10 08:01:28 -08:00
e820.c [PATCH] kdump: x86_64: add memmmap command line option 2006-01-10 08:01:27 -08:00
early_printk.c [PATCH] x86-64: Add simnow console 2005-09-12 10:49:58 -07:00
entry.S [PATCH] x86_64: Implement is_compat_task the right way 2006-01-11 19:04:53 -08:00
genapic_cluster.c [PATCH] x86_64/i386: Remove preempt disable calls in lowlevel IPI 2006-01-11 19:01:57 -08:00
genapic_flat.c [PATCH] x86_64/i386: Remove preempt disable calls in lowlevel IPI 2006-01-11 19:01:57 -08:00
genapic.c [PATCH] x86-64: Use physflat on Intel for < 8 CPUs with CPU hotplug 2005-09-12 10:50:56 -07:00
head64.c [PATCH] x86_64: Only use asm/sections.h to declare section symbols 2005-11-14 19:55:14 -08:00
head.S [PATCH] x86_64: Align and pad x86_64 GDT on page boundary 2006-01-11 19:04:53 -08:00
i387.c [PATCH] x86_64: Change init sections for CPU hotplug support 2005-06-25 16:24:30 -07:00
i8259.c Merge x86-64 update from Andi 2005-11-14 19:56:02 -08:00
init_task.c [PATCH] Change maxaligned_in_smp alignemnt macros to internodealigned_in_smp macros 2006-01-08 20:13:38 -08:00
io_apic.c [PATCH] x86_64: Fix off by one in IOMMU check 2006-01-11 19:04:54 -08:00
ioport.c [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
irq.c [PATCH] x86_64: Add idle notifiers 2006-01-11 19:04:55 -08:00
kprobes.c [PATCH] kprobes: fix race in recovery of reentrant probe 2006-01-11 18:42:12 -08:00
ldt.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
machine_kexec.c [PATCH] x86_64 machine_kexec: Use standard pagetable helpers 2005-07-29 13:12:49 -07:00
Makefile [PATCH] x86_64: Use function pointers to call DMA mapping functions 2006-01-11 19:04:55 -08:00
mce_amd.c [PATCH] x86_64: Add idle notifiers 2006-01-11 19:04:55 -08:00
mce_intel.c [PATCH] x86_64: Add idle notifiers 2006-01-11 19:04:55 -08:00
mce.c [PATCH] x86_64: increase MCE bank counts 2006-01-11 19:01:57 -08:00
module.c [PATCH] uml: kludgy compilation fixes for x86-64 subarch modules support 2005-05-05 16:36:33 -07:00
mpparse.c [PATCH] x86_64: Increase the maximum number of local APICs to the maximum 2005-11-14 19:55:17 -08:00
nmi.c [PATCH] x86_64: NMI watchdog frequency calculation adjustments 2005-09-13 08:22:33 -07:00
pci-dma.c [PATCH] x86_64: Use function pointers to call DMA mapping functions 2006-01-11 19:04:55 -08:00
pci-gart.c [PATCH] x86_64: Use function pointers to call DMA mapping functions 2006-01-11 19:04:55 -08:00
pci-nommu.c [PATCH] x86_64: Use function pointers to call DMA mapping functions 2006-01-11 19:04:55 -08:00
pci-swiotlb.c [PATCH] x86_64: Use function pointers to call DMA mapping functions 2006-01-11 19:04:55 -08:00
pmtimer.c [PATCH] x86_64: Add pmtimer support 2005-05-17 07:59:15 -07:00
process.c [PATCH] x86_64: Add idle notifiers 2006-01-11 19:04:55 -08:00
ptrace.c [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
reboot.c [PATCH] i386/x86-64: Don't IPI to offline cpus on shutdown 2006-01-11 19:04:50 -08:00
relocate_kernel.S [PATCH] kexec: x86_64 kexec implementation 2005-06-25 16:24:50 -07:00
setup64.c [PATCH] x86_64: Align and pad x86_64 GDT on page boundary 2006-01-11 19:04:53 -08:00
setup.c [PATCH] x86_64: Use function pointers to call DMA mapping functions 2006-01-11 19:04:55 -08:00
signal.c [PATCH] x86_64: Save/restore CS in 64bit signal handlers and force __USER_CS for CS 2005-11-14 19:55:15 -08:00
smp.c [PATCH] x86_64: Add idle notifiers 2006-01-11 19:04:55 -08:00
smpboot.c [PATCH] x86_64: Align and pad x86_64 GDT on page boundary 2006-01-11 19:04:53 -08:00
suspend_asm.S [PATCH] x86_64: Set up safe page tables during resume 2005-10-10 08:36:46 -07:00
suspend.c [PATCH] x86_64: Align and pad x86_64 GDT on page boundary 2006-01-11 19:04:53 -08:00
sys_x86_64.c [PATCH] x86_64: Use common sys_time64 2005-11-14 19:55:17 -08:00
syscall.c [PATCH] x86/x86_64: mark rodata section read-only: make some datastructures const 2006-01-06 08:33:36 -08:00
time.c [PATCH] x86_64: Handle missing local APIC timer interrupts on C3 state 2006-01-11 19:04:54 -08:00
trampoline.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
traps.c [PATCH] x86_64: Report hardware breakpoints in user space when triggered by the kernel 2006-01-11 19:04:54 -08:00
vmlinux.lds.S [PATCH] x86_64: Allow compilation on a 32bit biarch toolchain 2006-01-11 19:04:52 -08:00
vsyscall.c [PATCH] x86-64: Prevent gcc 4 from optimizing away vsyscalls 2005-09-12 10:50:56 -07:00
x8664_ksyms.c [PATCH] don't include ioctl32.h in drivers 2006-01-10 08:01:34 -08:00