linux/lib
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
..
reed_solomon [LIB] reed_solomon: Clean up trailing white spaces 2005-11-07 14:25:38 +01:00
zlib_deflate [PATCH] lib/zlib*: cleanups 2006-01-10 08:01:57 -08:00
zlib_inflate [PATCH] lib/zlib*: cleanups 2006-01-10 08:01:57 -08:00
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
bitmap.c [PATCH] cpuset: better bitmap remap defaults 2006-01-08 20:13:42 -08:00
bust_spinlocks.c
cmdline.c
crc16.c [PATCH] lib/crc16: added crc16 algorithm. 2005-09-08 14:41:27 -07:00
crc32.c [PATCH] crc32.c typo fix 2005-08-07 10:00:40 -07:00
crc32defs.h
crc-ccitt.c
ctype.c
dec_and_lock.c [PATCH] atomic: dec_and_lock use atomic primitives 2006-01-08 20:13:48 -08:00
div64.c
dump_stack.c
errno.c
extable.c [PATCH] extable: remove needless declaration 2005-10-30 17:37:26 -08:00
find_next_bit.c [PATCH] frv: implement and export various things required by modules 2006-01-08 20:13:36 -08:00
gen_crc32table.c
genalloc.c [PATCH] fix broken lib/genalloc.c 2005-11-28 14:42:23 -08:00
halfmd4.c
idr.c [PATCH] Whitespace and CodingStyle cleanup for lib/idr.c 2005-10-30 17:37:19 -08:00
inflate.c [PATCH] Update in-kernel zlib routines 2005-08-05 16:23:21 -07:00
int_sqrt.c
iomap.c
Kconfig [PATCH] lib/crc16: added crc16 algorithm. 2005-09-08 14:41:27 -07:00
Kconfig.debug [PATCH] let MAGIC_SYSRQ no longer depend on DEBUG_KERNEL 2006-01-10 08:02:02 -08:00
kernel_lock.c [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
klist.c [PATCH] klist: Fix broken kref counting in find functions 2006-01-04 16:18:08 -08:00
kobject_uevent.c [PATCH] kobject_uevent CONFIG_NET=n fix 2006-01-04 16:18:08 -08:00
kobject.c [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
kref.c
libcrc32c.c
Makefile [PATCH] swiotlb: move from arch/ia64/lib/ to lib/ 2005-09-29 14:42:42 -07:00
parser.c
prio_tree.c
radix-tree.c [PATCH] radix-tree: reduce tree height upon partial truncation 2006-01-08 20:13:41 -08:00
rbtree.c
rwsem-spinlock.c
rwsem.c
semaphore-sleepers.c [PATCH] unify x86/x86-64 semaphore code 2005-09-05 00:06:14 -07:00
sha1.c
smp_processor_id.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
sort.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
spinlock_debug.c [PATCH] printk levels for spinlock debug 2006-01-10 08:01:24 -08:00
string.c [PATCH] lib/string.c cleanup: restore useful memmove const 2005-10-30 17:37:27 -08:00
swiotlb.c [PATCH] x86_64: Use function pointers to call DMA mapping functions 2006-01-11 19:04:55 -08:00
textsearch.c [PATCH] gfp_t: lib/* 2005-10-28 08:16:47 -07:00
ts_bm.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
ts_fsm.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
ts_kmp.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
vsprintf.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00