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 PCI: doc/pci: create Documentation/PCI/ and move files into it 2008-04-20 21:46:51 -07:00
RCU rcu: make rcutorture even more vicious: invoke RCU readers from irq handlers (timers) 2008-06-26 09:24:33 +02:00
accounting per-task-delay-accounting: update document and getdelays.c for memory reclaim 2008-07-25 10:53:47 -07:00
acpi ACPI: Remove ACPI_CUSTOM_DSDT_INITRD option 2008-03-15 11:58:04 -07:00
aoe aoe: user can ask driver to forget previously detected devices 2008-02-08 09:22:31 -08:00
arm [MTD] [NAND] S3C2410 Large page NAND support 2008-04-22 21:39:16 +01:00
auxdisplay Miguel Ojeda has moved 2008-07-04 10:40:05 -07:00
blackfin
block block: Data integrity infrastructure documentation 2008-07-03 13:21:13 +02:00
cdrom cdrom: make unregister_cdrom() return void 2008-04-21 09:50:08 +02:00
connector
console
controllers memcg: limit change shrink usage 2008-07-25 10:53:37 -07:00
cpu-freq [CPUFREQ] Remove documentation of removed ondemand tunable. 2008-05-20 22:13:09 -04:00
cpuidle cpuidle: Add Documentation 2008-02-14 00:16:13 -05:00
cris
crypto
device-mapper dm crypt: add documentation 2008-04-25 13:27:03 +01:00
driver-model Driver core: Update some prototypes in platform.txt 2008-02-02 15:14:49 -08:00
dvb V4L/DVB (7077): bt878: remove handcrafted PCI subsystem ID check 2008-01-25 19:05:22 -02:00
early-userspace Documentation: Remove last references to BitKeeper. 2008-04-21 22:19:05 +00:00
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 firmware_sample_driver.c: fix coding style 2008-04-21 22:23:30 +00:00
frv move frv docs one level up 2008-02-03 15:54:28 +02:00
hwmon hwmon: Update the sysfs interface documentation 2008-06-19 06:50:31 -04:00
i2c i2c: Convert the max6875 driver to a new-style i2c driver 2008-07-16 19:30:07 +02:00
i2o
ia64 [IA64] pvops: documentation on ia64/pv_ops 2008-05-27 15:16:47 -07:00
ide gayle: add "doubler" parameter 2008-04-27 15:38:30 +02:00
infiniband
input Input: remove CVS keywords 2008-05-20 12:17:39 -04:00
ioctl IDE: Report errors during drive reset back to user space 2008-07-16 20:33:48 +02:00
isdn
ja_JP Fix broken utf-8 encodings in ja_JP translation of stable_kernel_rules.txt 2008-02-21 15:27:06 -08:00
kbuild kconfig-language.txt: remove bogus hint 2008-05-04 21:05:56 +02:00
kdump x86: fix documentation bug about relocatability 2008-07-08 13:16:18 +02:00
ko_KR
laptops ACPI: thinkpad-acpi: bump up version to 0.21 2008-07-21 09:15:51 -03:00
lguest lguest: notify on empty 2008-05-30 15:09:46 +10:00
m68k
make
mips au1xxx-ide: fix MWDMA support 2008-04-26 22:25:22 +02:00
mn10300 mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
namespaces
netlabel
networking e1000: delete non NAPI code from the driver 2008-07-22 19:39:11 -04:00
parisc
pcmcia pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
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 generic, x86: add tests for prctl PR_GET_TSC and PR_SET_TSC 2008-04-19 19:19:55 +02:00
s390 [S390] cio: Remove cio_msg kernel parameter. 2008-05-07 09:23:01 +02:00
scheduler sched: fix typo in Documentation/scheduler/sched-rt-group.txt 2008-06-18 12:34:15 +02:00
scsi [SCSI] aacraid: Add Power Management cards to documentation 2008-06-05 09:23:44 -05:00
serial Subject: [PATCH 1/2] serial: Add flush_buffer() operation to uart_ops 2008-07-20 17:12:34 -07:00
sh
sound remove mention of CONFIG_KMOD from documentation 2008-07-22 19:24:29 +10:00
sparc
spi documentation: move spidev_fdx example to its own source file 2008-04-28 08:58:31 -07:00
sysctl Documentation: sysctl/kernel.txt: fix documentation reference 2008-02-13 16:21:20 -08:00
telephony remove mention of CONFIG_KMOD from documentation 2008-07-22 19:24:29 +10:00
thermal thermal: update the documentation 2008-04-29 02:49:47 -04:00
timers Documentation: move timer related documentation to a single place 2008-04-17 12:22:31 +02:00
tracers doc: update mmiotrace doc to current status 2008-05-24 11:27:22 +02:00
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 w1-gpio: add GPIO w1 bus master driver 2008-02-06 10:41:15 -08:00
watchdog
x86 x86 boot: only pick up additional EFI memmap if add_efi_memmap flag 2008-07-08 13:10:41 +02:00
zh_CN Chinese: add translation of Codingstyle 2008-01-24 20:40:04 -08:00
00-INDEX remove some more tipar bits 2008-07-25 10:53:28 -07:00
BUG-HUNTING Documentation: add hint about call traces & module symbols to BUG-HUNTING 2008-02-06 10:41:09 -08:00
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 doc: replace yet another dev with pdev for consistency in DMA-mapping.txt 2008-04-29 08:55:01 -07:00
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 genirq: Expose default irq affinity mask (take 3) 2008-06-05 15:18:30 +02:00
IRQ.txt
Intel-IOMMU.txt
MSI-HOWTO.txt
ManagementStyle
README.DAC960
README.cycladesZ
SAK.txt
SM501.txt
SecurityBugs
Smack.txt Smack: Simplified Mandatory Access Control Kernel 2008-02-05 09:44:20 -08:00
SubmitChecklist Documentation: prune redundant SubmitChecklist items 2008-02-13 16:21:18 -08:00
SubmittingDrivers
SubmittingPatches doc: add suggestions about good practises for maintainers 2008-06-05 14:25:24 -07:00
VGA-softcursor.txt
applying-patches.txt
atomic_ops.txt documentation: atomic_add_unless() doesn't imply mb() on failure 2008-02-23 17:52:36 -08:00
basic_profiling.txt
binfmt_misc.txt
braille-console.txt Basic braille screen reader support 2008-04-30 08:29:52 -07:00
bt8xxgpio.txt gpio: add bt8xxgpio driver 2008-07-25 10:53:30 -07:00
cachetlb.txt
cciss.txt cciss: add new hardware support 2008-06-12 18:05:40 -07:00
cgroups.txt cgroups: document the effect of attaching PID 0 to a cgroup 2008-07-04 10:40:08 -07:00
cli-sti-removal.txt DOCUMENTATION: Use newer DEFINE_SPINLOCK macro in docs. 2008-04-21 22:44:50 +00:00
computone.txt
cpqarray.txt
cpu-hotplug.txt [S390] Get rid of additional_cpus kernel parameter. 2008-01-26 14:11:15 +01:00
cpu-load.txt
cpusets.txt doc: document the relax_domain_level kernel boot argument 2008-07-04 10:40:10 -07:00
cputopology.txt cpu topology: always define CPU topology information 2008-06-13 10:09:46 +02:00
dcdbas.txt
debugging-modules.txt Documentation: Clarify when module debugging actually works. 2008-02-03 15:27:38 +02:00
debugging-via-ohci1394.txt firewire: fw-ohci: add option for remote debugging 2008-04-18 17:55:33 +02:00
dell_rbu.txt
devices.txt
digiepca.txt
dontdiff dontdiff: ignore timeconst.h 2008-04-28 22:51:56 +02:00
edac.txt edac: core fix redundant sysfs controls to parameters 2008-07-25 10:53:49 -07:00
eisa.txt
email-clients.txt email-clients.txt: sylpheed is OK at IMAP 2008-02-07 08:42:17 -08:00
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 ftrace: ftrace.txt updates 2008-07-15 18:57:20 -07:00
gpio.txt gpiolib: allow user-selection 2008-07-25 10:53:30 -07:00
hayes-esp.txt
highuid.txt [SPARC]: Remove SunOS and Solaris binary support. 2008-04-21 15:10:15 -07:00
hpet.txt
hw_random.txt hw_random doc updates 2008-03-24 19:22:19 -07:00
initrd.txt use the newc archive format as requested by initramfs 2008-02-03 14:54:41 +02:00
io_ordering.txt
ioctl-number.txt [S390] cio: Add chsc subchannel driver. 2008-07-14 10:02:12 +02:00
iostats.txt Enhanced partition statistics: documentation update 2008-02-08 12:42:11 +01:00
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt doc: document the kernel-doc conventions for kernel hackers 2008-06-06 11:29:12 -07:00
kernel-docs.txt doc: update to URL and status of kernel-docs.txt entry 2008-06-06 11:29:10 -07:00
kernel-parameters.txt remove some more tipar bits 2008-07-25 10:53:28 -07:00
keys-request-key.txt keys: allow the callout data to be passed as a blob rather than a string 2008-04-29 08:06:16 -07:00
keys.txt keys: make the keyring quotas controllable through /proc/sys 2008-04-29 08:06:17 -07:00
kobject.txt kobject: Documentation Spelling Patch 2008-06-11 16:50:40 -07:00
kprobes.txt powerpc/booke: Add kprobes support for booke style processors 2008-06-26 03:35:46 -05:00
kref.txt docs: convert kref semaphore to mutex 2008-02-06 10:41:09 -08:00
ldm.txt
leds-class.txt leds: disable triggers on brightness set 2008-04-24 23:34:18 +01:00
local_ops.txt
lockdep-design.txt
lockstat.txt
logo.gif
logo.txt
magic-number.txt [SPARC]: Remove SunOS and Solaris binary support. 2008-04-21 15:10:15 -07:00
markers.txt
mca.txt The ps2esdi driver was marked as BROKEN more than two years ago due to being 2008-03-17 09:03:05 +01:00
md.txt md: Tidy up rdev_size_store a bit: 2008-07-21 14:22:18 +10:00
memory-barriers.txt read_barrier_depends arch fixlets 2008-05-14 10:05:18 -07:00
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 x86: nmi_watchdog - documentation fix - v2 2008-07-08 13:16:10 +02:00
nommu-mmap.txt
numastat.txt
oops-tracing.txt Taint kernel after WARN_ON(condition) 2008-04-29 08:05:59 -07:00
paride.txt
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt Documentation: Replace obsolete "driverfs" with "sysfs". 2008-01-24 20:40:04 -08:00
preempt-locking.txt
prio_tree.txt
ramdisk.txt
rbtree.txt
rfkill.txt rfkill: improve documentation for kernel drivers 2008-06-26 14:21:22 -04:00
riscom8.txt
robust-futex-ABI.txt
robust-futexes.txt
rocket.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt rtc: cleanup example code 2008-02-06 10:41:14 -08:00
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 Add additional examples in Documentation/spinlocks.txt 2008-04-11 13:21:14 -06:00
stable_api_nonsense.txt
stable_kernel_rules.txt stable_kernel_rules: fix must already be in mainline 2008-02-21 15:27:07 -08:00
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 sysrq: add show-backtrace-on-all-cpus function 2008-04-29 08:06:03 -07:00
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/