android_kernel_motorola_sm6375/arch/mips
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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.

[[email protected]: fix sge]
[[email protected]: fix svc_rdma]
[[email protected]: build fix]
[[email protected]: fix bnx2x]
[[email protected]: fix s2io]
[[email protected]: fix pasemi_mac]
[[email protected]: fix sdhci]
[[email protected]: build fix]
[[email protected]: fix sparc]
[[email protected]: fix ibmvscsi]
Signed-off-by: FUJITA Tomonori <[email protected]>
Cc: Muli Ben-Yehuda <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Avi Kivity <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2008-07-26 12:00:03 -07:00
..
au1000 remove include/linux/pm_legacy.h 2008-07-24 10:47:22 -07:00
basler/excite basler-excite: BKL pushdown 2008-06-20 14:05:54 -06:00
bcm47xx [MIPS] BCM47XX: Use new SSB SPROM data structure 2008-02-19 17:01:34 +00:00
boot
cobalt [MIPS] Cobalt: Fix I/O port resource range 2008-07-20 14:38:20 +01:00
configs [MIPS] Routerboard 532: Support for base system 2008-07-20 14:38:18 +01:00
dec [MIPS] DS1287: Add clockevent driver 2008-04-28 17:14:32 +01:00
emma2rh [MIPS] Remove mips_machtype from EMMA2RH machines 2008-07-15 18:44:39 +01:00
fw [MIPS] Remove mips_machtype from ARC based machines 2008-07-15 18:44:38 +01:00
gt64120/wrppmc [MIPS] remove wrppmc_machine_power_off() 2008-07-15 18:44:36 +01:00
jazz [MIPS] Remove mips_machtype from ARC based machines 2008-07-15 18:44:38 +01:00
kernel remove unused #include <linux/dirent.h>'s 2008-07-25 10:53:34 -07:00
lasat [MIPS] Remove mips_machtype for LASAT machines 2008-07-15 18:44:39 +01:00
lemote/lm2e
lib iomap: fix 64 bits resources on 32 bits 2008-04-29 08:06:02 -07:00
math-emu [MIPS] Fix missing prototypes in asm/fpu.h 2008-07-20 14:38:17 +01:00
mipssim [MIPS] Remove TLB sanitation code 2008-04-28 17:14:25 +01:00
mm dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
mti-malta [MIPS] Malta: Cleanup organization of code into directories. 2008-07-15 18:44:34 +01:00
nxp/pnx8550 [MIPS] Alchemy, PNX: Use symbolic constants for DMA masks. 2008-07-15 18:44:29 +01:00
oprofile generic-ipi: more merge fallout 2008-07-15 22:08:52 +02:00
pci [MIPS] Routerboard 532: Support for base system 2008-07-20 14:38:18 +01:00
pmc-sierra Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
rb532 [MIPS] Routerboard 532: Support for base system 2008-07-20 14:38:18 +01:00
sgi-ip22 [MIPS] mips/sgi-ip22/ip28-berr.c: fix the build 2008-07-20 14:38:19 +01:00
sgi-ip27 PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures 2008-07-24 10:47:21 -07:00
sgi-ip32 [MIPS] IP32: Use common SGI button driver 2008-07-20 14:38:18 +01:00
sibyte device create: mips: convert device_create to device_create_drvdata 2008-07-21 21:54:43 -07:00
sni [MIPS] Remove obsolete isa_slot_offset 2008-07-15 18:44:29 +01:00
txx9 [MIPS] TXx9: Fix some sparse warnings 2008-07-20 14:38:21 +01:00
vr41xx [MIPS] cmbvr4133: Remove support 2008-07-15 18:44:36 +01:00
Kconfig gpiolib: allow user-selection 2008-07-25 10:53:30 -07:00
Kconfig.debug [MIPS] Allow setting of the cache attribute at run time. 2008-04-28 17:14:25 +01:00
Makefile [MIPS] Routerboard 532: Support for base system 2008-07-20 14:38:18 +01:00