kernel-fxtec-pro1x/include/asm-mn10300
FUJITA Tomonori 8d8bb39b9e dma-mapping: add the device argument to dma_mapping_error()
Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
architecture does:

This enables us to cleanly fix the Calgary IOMMU issue that some devices
are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

I think that per-device dma_mapping_ops support would be also helpful for
KVM people to support PCI passthrough but Andi thinks that this makes it
difficult to support the PCI passthrough (see the above thread).  So I
CC'ed this to KVM camp.  Comments are appreciated.

A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
NULL, the system-wide dma_ops pointer is used as before.

If it's useful for KVM people, I plan to implement a mechanism to register
a hook called when a new pci (or dma capable) device is created (it works
with hot plugging).  It enables IOMMUs to set up an appropriate
dma_mapping_ops per device.

The major obstacle is that dma_mapping_error doesn't take a pointer to the
device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
device.  Note all the POWER IOMMUs use the same dma_mapping_error function
so this is not a problem for POWER but x86 IOMMUs use different
dma_mapping_error functions.

The first patch adds the device argument to dma_mapping_error.  The patch
is trivial but large since it touches lots of drivers and dma-mapping.h in
all the architecture.

This patch:

dma_mapping_error() doesn't take a pointer to the device unlike other DMA
operations.  So we can't have dma_mapping_ops per device.

Note that POWER already has dma_mapping_ops per device but all the POWER
IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
argument.

[akpm@linux-foundation.org: fix sge]
[akpm@linux-foundation.org: fix svc_rdma]
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix bnx2x]
[akpm@linux-foundation.org: fix s2io]
[akpm@linux-foundation.org: fix pasemi_mac]
[akpm@linux-foundation.org: fix sdhci]
[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix sparc]
[akpm@linux-foundation.org: fix ibmvscsi]
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26 12:00:03 -07:00
..
proc-mn103e010 mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
unit-asb2303 mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
unit-asb2305 mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
.gitignore mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
atomic.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
auxvec.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
bitops.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
bug.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
bugs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
busctl-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
byteorder.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
cache.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
cacheflush.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
checksum.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
cpu-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
cputime.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
current.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
delay.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
device.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
div64.h rename div64_64 to div64_u64 2008-05-01 08:03:58 -07:00
dma-mapping.h dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
dma.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
dmactl-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
elf.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
emergency-restart.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
errno.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
exceptions.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
fb.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
fcntl.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
fpu.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
frame.inc mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
futex.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
gdb-stub.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
hardirq.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
highmem.h Final removal of FASTCALL()/fastcall 2008-02-13 16:21:18 -08:00
hw_irq.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
ide.h ide: define MAX_HWIFS in <linux/ide.h> 2008-07-24 22:53:30 +02:00
intctl-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
io.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
ioctl.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
ioctls.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
ipc.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
ipcbuf.h MN10300: Fix typo in header guard 2008-05-28 07:59:06 -07:00
irq.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
irq_regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
Kbuild Really unexport asm/page.h 2008-03-06 08:13:47 -08:00
kdebug.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
kmap_types.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
kprobes.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
linkage.h Final removal of FASTCALL()/fastcall 2008-02-13 16:21:18 -08:00
local.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mc146818rtc.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mman.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mmu.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mmu_context.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
module.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
msgbuf.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mutex.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
namei.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
nmi.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
page.h PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures 2008-07-24 10:47:21 -07:00
page_offset.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
param.h MN10300: define HZ as a config option 2008-02-23 17:12:13 -08:00
pci.h mn10300: move sg_dma_{address,len}() to asm/scatterlist.h 2008-07-24 10:47:24 -07:00
percpu.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
pgalloc.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
pgtable.h mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
pio-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
poll.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
posix_types.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
processor.h MN10300: Make cpu_relax() invoke barrier() 2008-05-08 10:49:39 -07:00
ptrace.h include/asm/ptrace.h userspace headers cleanup 2008-07-25 10:53:39 -07:00
reset-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
resource.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
rtc-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
rtc.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
scatterlist.h mn10300: move sg_dma_{address,len}() to asm/scatterlist.h 2008-07-24 10:47:24 -07:00
sections.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
sembuf.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
serial-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
serial.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
setup.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
shmbuf.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
shmparam.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
sigcontext.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
siginfo.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
signal.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
smp.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
socket.h MN10300: define SO_MARK 2008-02-23 17:12:13 -08:00
sockios.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
spinlock.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
stat.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
statfs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
string.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
system.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
termbits.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
termios.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
thread_info.h clean up duplicated alloc/free_thread_info 2008-07-25 10:53:28 -07:00
timer-regs.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
timex.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
tlb.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
tlbflush.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
topology.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
types.h mn10300: types: use <asm-generic/int-*.h> for the mn10300 architecture 2008-05-02 16:18:31 -07:00
uaccess.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
ucontext.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
unaligned.h kernel: Move arches to use common unaligned access 2008-04-29 08:06:27 -07:00
unistd.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
user.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
vga.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
xor.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00