android_kernel_xiaomi_sm8350/arch
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
..
alpha [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
arm [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
arm26 [PATCH] dump_thread() cleanup 2006-01-10 08:01:25 -08:00
cris [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
frv Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2006-01-10 08:21:33 -08:00
h8300 [PATCH] h8300: remove MAGIC_ROM_PTR from memory.c 2006-01-10 09:31:26 -08:00
i386 [PATCH] i386: Handle missing local APIC timer interrupts on C3 state 2006-01-11 19:04:54 -08:00
ia64 [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
m32r [PATCH] dump_thread() cleanup 2006-01-10 08:01:25 -08:00
m68k [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
m68knommu [PATCH] m68knommu: fix ram length of m5208evb board 2006-01-10 09:31:27 -08:00
mips [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
parisc [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
powerpc [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
ppc [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
s390 [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
sh [PATCH] dump_thread() cleanup 2006-01-10 08:01:25 -08:00
sh64 [PATCH] dump_thread() cleanup 2006-01-10 08:01:25 -08:00
sparc [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
sparc64 [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
um [PATCH] uml: kill an unused variable 2006-01-11 18:42:10 -08:00
v850 [PATCH] dump_thread() cleanup 2006-01-10 08:01:25 -08:00
x86_64 [PATCH] x86_64: Use function pointers to call DMA mapping functions 2006-01-11 19:04:55 -08:00
xtensa [PATCH] "tiny-make-id16-support-optional" fixes 2006-01-10 08:01:23 -08:00