WSL2-Linux-Kernel/Documentation
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
..
ABI memory-hotplug: add sysfs removable attribute for hotplug memory remove 2008-07-24 10:47:21 -07:00
DocBook procfs-guide: drop pointless &nbsp; entities 2008-07-25 10:53:35 -07:00
PCI
RCU
accounting per-task-delay-accounting: update document and getdelays.c for memory reclaim 2008-07-25 10:53:47 -07:00
acpi
aoe
arm
auxdisplay
blackfin
block
cdrom
connector
console
controllers memcg: limit change shrink usage 2008-07-25 10:53:37 -07:00
cpu-freq
cpuidle
cris
crypto
device-mapper
driver-model
dvb
early-userspace
fault-injection
fb video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver 2008-07-24 10:47:41 -07:00
filesystems UTC timestamp option for FAT filesystems fix 2008-07-25 10:53:34 -07:00
firmware_class
frv
hwmon
i2c
i2o
ia64
ide
infiniband
input
ioctl
isdn
ja_JP
kbuild
kdump
ko_KR
laptops
lguest
m68k
make
mips
mn10300
namespaces
netlabel
networking e1000: delete non NAPI code from the driver 2008-07-22 19:39:11 -04:00
parisc
pcmcia
power pm: remove obsolete piece of PM documentation 2008-07-24 10:47:23 -07:00
powerpc Merge commit 'gcl/gcl-next' 2008-07-25 15:35:03 +10:00
prctl
s390
scheduler
scsi
serial
sh
sound remove mention of CONFIG_KMOD from documentation 2008-07-22 19:24:29 +10:00
sparc
spi
sysctl
telephony remove mention of CONFIG_KMOD from documentation 2008-07-22 19:24:29 +10:00
thermal
timers
tracers
uml
usb USB: use reset_resume when normal resume fails 2008-07-21 15:16:48 -07:00
video4linux remove mention of CONFIG_KMOD from documentation 2008-07-22 19:24:29 +10:00
vm hugetlb: new sysfs interface 2008-07-24 10:47:17 -07:00
w1
watchdog
x86
zh_CN
00-INDEX remove some more tipar bits 2008-07-25 10:53:28 -07:00
BUG-HUNTING
Changes
CodingStyle documentation: update CodingStyle tips for Emacs users 2008-07-25 10:53:29 -07:00
DMA-API.txt dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
DMA-ISA-LPC.txt
DMA-attributes.txt powerpc/cell: Add DMA_ATTR_WEAK_ORDERING dma attribute and use in Cell IOMMU code 2008-07-22 10:39:36 +10:00
DMA-mapping.txt
HOWTO HOWTO: change email addresses of James in HOWTO 2008-07-21 21:54:59 -07:00
IO-mapping.txt
IPMI.txt
IRQ-affinity.txt
IRQ.txt
Intel-IOMMU.txt
MSI-HOWTO.txt
ManagementStyle
README.DAC960
README.cycladesZ
SAK.txt
SM501.txt
SecurityBugs
Smack.txt
SubmitChecklist
SubmittingDrivers
SubmittingPatches
VGA-softcursor.txt
applying-patches.txt
atomic_ops.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt gpio: add bt8xxgpio driver 2008-07-25 10:53:30 -07:00
cachetlb.txt
cciss.txt
cgroups.txt
cli-sti-removal.txt
computone.txt
cpqarray.txt
cpu-hotplug.txt
cpu-load.txt
cpusets.txt
cputopology.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt
digiepca.txt
dontdiff
edac.txt edac: core fix redundant sysfs controls to parameters 2008-07-25 10:53:49 -07:00
eisa.txt
email-clients.txt
exception.txt
feature-removal-schedule.txt pidns: remove find_task_by_pid, unused for a long time 2008-07-25 10:53:45 -07:00
floppy.txt
ftrace.txt
gpio.txt gpiolib: allow user-selection 2008-07-25 10:53:30 -07:00
hayes-esp.txt
highuid.txt
hpet.txt
hw_random.txt
initrd.txt
io_ordering.txt
ioctl-number.txt
iostats.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt remove some more tipar bits 2008-07-25 10:53:28 -07:00
keys-request-key.txt
keys.txt
kobject.txt
kprobes.txt
kref.txt
ldm.txt
leds-class.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
logo.gif
logo.txt
magic-number.txt
markers.txt
mca.txt
md.txt
memory-barriers.txt
memory-hotplug.txt
memory.txt
mono.txt
moxa-smartio Char: mxser, update documentation 2008-07-25 10:53:44 -07:00
mtrr.txt
mutex-design.txt
nbd.txt
nmi_watchdog.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt
paride.txt
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
prio_tree.txt
ramdisk.txt
rbtree.txt
rfkill.txt
riscom8.txt
robust-futex-ABI.txt
robust-futexes.txt
rocket.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
sparse.txt
specialix.txt specialix: Code cleanups 2008-07-22 13:03:27 -07:00
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt
stallion.txt
svga.txt
sx.txt
sysfs-rules.txt sysfs-rules.txt: reword API stability statement 2008-07-21 21:54:59 -07:00
sysrq.txt
tty.txt
unaligned-memory-access.txt introduce HAVE_EFFICIENT_UNALIGNED_ACCESS Kconfig symbol 2008-07-25 10:53:27 -07:00
unicode.txt
unshare.txt
video-output.txt
volatile-considered-harmful.txt
voyager.txt
zorro.txt

README.cycladesZ

The Cyclades-Z must have firmware loaded onto the card before it will
operate.  This operation should be performed during system startup,

The firmware, loader program and the latest device driver code are
available from Cyclades at
    ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/