android_kernel_motorola_sm6225/drivers/net/wireless
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
..
ath5k dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
b43 wireless: fix warnings from QoS patch 2008-07-15 02:08:24 -07:00
b43legacy mac80211: fix TX sequence numbers 2008-07-14 14:52:57 -04:00
hostap netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep. 2008-07-22 14:16:42 -07:00
iwlwifi iwlwifi: make index unsigned int for iwl_send_led_cmd 2008-07-14 14:53:00 -04:00
libertas Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
p54 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
prism54 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2008-06-28 22:57:58 -07:00
rt2x00 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
zd1211rw Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2008-07-14 20:40:34 -07:00
adm8211.c adm8211: remove unnecessary protected bit mask/check 2008-06-26 16:50:02 -04:00
adm8211.h mac80211: move TX info into skb->cb 2008-05-21 21:48:11 -04:00
airo.c wireless: Small cleanups 2008-06-27 09:09:20 -04:00
airo.h
airo_cs.c
airport.c
arlan-main.c arlan: use netstats in net_device structure 2008-05-14 16:29:48 -04:00
arlan-proc.c
arlan.h arlan: use netstats in net_device structure 2008-05-14 16:29:48 -04:00
atmel.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
atmel.h
atmel_cs.c
atmel_pci.c
hermes.c
hermes.h
hermes_rid.h
i82586.h
i82593.h
ipw2100.c
ipw2100.h
ipw2200.c ipw2200: Call netif_*_queue() interfaces properly. 2008-07-22 18:32:47 -07:00
ipw2200.h ipw2200: queue direct scans 2008-06-09 15:50:16 -04:00
Kconfig Revert "remove the strip driver" 2008-07-18 03:58:52 -07:00
mac80211_hwsim.c mac80211_hwsim.c: fix: BUG: unable to handle kernel NULL pointer dereference at 0000000000000370 2008-07-21 13:19:35 -07:00
Makefile Revert "remove the strip driver" 2008-07-18 03:58:52 -07:00
netwave_cs.c
orinoco.c wext: Emit event stream entries correctly when compat. 2008-06-16 18:50:49 -07:00
orinoco.h
orinoco_cs.c orinoco_cs: add ID for SpeedStream wireless adapters 2008-05-20 17:55:30 -04:00
orinoco_nortel.c
orinoco_pci.c
orinoco_pci.h
orinoco_plx.c
orinoco_tmd.c
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2008-06-28 22:57:58 -07:00
rtl818x.h rtl8187: Change detection of RTL8187B with USB ID of 8187 2008-07-08 14:16:07 -04:00
rtl8180.h
rtl8180_dev.c mac80211: use multi-queue master netdevice 2008-05-21 21:48:14 -04:00
rtl8180_grf5101.c rtl8180: fix wrong parameter in grf5101_rf_set_channel 2008-05-28 16:43:40 -04:00
rtl8180_grf5101.h
rtl8180_max2820.c rtl8180: fix wrong parameter in max2820_rf_set_channel 2008-05-28 16:43:39 -04:00
rtl8180_max2820.h
rtl8180_rtl8225.c
rtl8180_rtl8225.h
rtl8180_sa2400.c rtl8180: fix wrong parameter in sa2400_rf_set_channel 2008-05-28 16:43:38 -04:00
rtl8180_sa2400.h
rtl8187.h rtl8187: updating rtl8187.h to support RTL8187B 2008-07-08 14:16:06 -04:00
rtl8187_dev.c rtl8187: use different ANAPARAM*_OFF values for 8187B 2008-07-14 14:52:56 -04:00
rtl8187_rtl8225.c rtl8187: use different ANAPARAM*_OFF values for 8187B 2008-07-14 14:52:56 -04:00
rtl8187_rtl8225.h rtl8187: use different ANAPARAM*_OFF values for 8187B 2008-07-14 14:52:56 -04:00
spectrum_cs.c
strip.c Fix strip driver back up for ldisc/tty changes 2008-07-20 17:12:38 -07:00
wavelan.c wavelan: avoid index past end of array if DEBUG_SHOW_UNUSED is defined 2008-05-12 21:18:05 -04:00
wavelan.h
wavelan.p.h
wavelan_cs.c wavelan: avoid index past end of array if DEBUG_SHOW_UNUSED is defined 2008-05-12 21:18:05 -04:00
wavelan_cs.h
wavelan_cs.p.h
wl3501.h
wl3501_cs.c wext: Emit event stream entries correctly when compat. 2008-06-16 18:50:49 -07:00
zd1201.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-07-18 02:39:39 -07:00
zd1201.h