linux/drivers
Keshavamurthy, Anil S f76aec76ec intel-iommu: optimize sg map/unmap calls
This patch adds PageSelectiveInvalidation support replacing existing
DomainSelectiveInvalidation for intel_{map/unmap}_sg() calls and also
enables to mapping one big contiguous DMA virtual address which is mapped
to discontiguous physical address for SG map/unmap calls.

"Doamin selective invalidations" wipes out the IOMMU address translation
cache based on domain ID where as "Page selective invalidations" wipes out
the IOMMU address translation cache for that address mask range which is
more cache friendly when compared to Domain selective invalidations.

Here is how it is done.
1) changes to iova.c
alloc_iova() now takes a bool size_aligned argument, which
when when set, returns the io virtual address that is
naturally aligned to 2 ^ x, where x is the order
of the size requested.

Returning this io vitual address which is naturally
aligned helps iommu to do the "page selective
invalidations" which is IOMMU cache friendly
over "domain selective invalidations".

2) Changes to driver/pci/intel-iommu.c
Clean up intel_{map/unmap}_{single/sg} () calls so that
s/g map/unamp calls is no more dependent on
intel_{map/unmap}_single()

intel_map_sg() now computes the total DMA virtual address
required and allocates the size aligned total DMA virtual address
and maps the discontiguous physical address to the allocated
contiguous DMA virtual address.

In the intel_unmap_sg() case since the DMA virtual address
is contiguous and size_aligned, PageSelectiveInvalidation
is used replacing earlier DomainSelectiveInvalidations.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Greg KH <greg@kroah.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Suresh B <suresh.b.siddha@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-22 08:13:19 -07:00
..
acorn/char unicode diacritics support 2007-10-17 08:42:52 -07:00
acpi Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
amba
ata Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
atm Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
auxdisplay
base memory hotplug: rearrange memory hotplug notifier 2007-10-22 08:13:17 -07:00
block remove unused return within void return function 2007-10-20 02:18:21 +02:00
bluetooth
cdrom Use helpers to obtain task pid in printks 2007-10-19 11:53:43 -07:00
char Documentation: Remove references to dead "cyclades=" boot option 2007-10-20 00:01:12 +02:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma I/OAT: Add completion callback for async_tx interface use 2007-10-18 14:37:32 -07:00
edac NULL terminate the pci_device_ids in pasemi_edac 2007-10-19 11:53:56 -07:00
eisa
fc4
firewire fix typo "insted" -> "instead" 2007-10-20 01:55:04 +02:00
firmware define global BIT macro 2007-10-19 11:53:42 -07:00
hid changed email 2007-10-20 00:47:32 +02:00
hwmon Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
i2c typo fixes 2007-10-20 01:34:40 +02:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
ieee1394
infiniband [INET]: Justification for local port range robustness. 2007-10-18 22:00:17 -07:00
input Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
isdn Spelling fix: explicitly 2007-10-19 23:22:55 +02:00
kvm
leds fix typo "sort" -> "short" 2007-10-20 01:55:58 +02:00
lguest Merge branch 'xen-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen 2007-10-17 11:10:11 -07:00
macintosh Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
media more UTF-8 conversions 2007-10-19 23:22:11 +02:00
message Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
mfd typo fixes 2007-10-20 01:34:40 +02:00
misc typo fixes 2007-10-20 01:34:40 +02:00
mmc mmc: at91_mci: cleanup: use MCI_ERRORS 2007-10-17 21:35:10 +02:00
mtd typo fixes 2007-10-20 01:34:40 +02:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
nubus
of [SPARC/64]: Consolidate of_register_driver 2007-10-17 21:17:42 -07:00
oprofile
parisc [PARISC] Fix infinite loop in /proc/iomem 2007-10-18 12:34:22 -07:00
parport sysctl: parport remove binary paths 2007-10-18 14:37:23 -07:00
pci intel-iommu: optimize sg map/unmap calls 2007-10-22 08:13:19 -07:00
pcmcia remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
pnp PNP: add debug message for adding new device 2007-10-17 08:43:04 -07:00
power Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
ps3 remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
rapidio
rtc typo fixes 2007-10-20 01:34:40 +02:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
sbus vfc_dev conversion to mutex: fallout 2007-10-20 15:04:06 -07:00
scsi Spelling fix: explicitly 2007-10-19 23:22:55 +02:00
serial Blackfin serial driver Kconfig: depend on DMA not being enabled rather than a specific DMA size 2007-10-21 22:30:01 +08:00
sh
sn
spi Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
ssb [PATCH] ssb: fix build failure 2007-10-16 21:04:11 -04:00
tc lk201: remove obsolete driver 2007-10-17 08:42:57 -07:00
telephony
uio
usb typo fixes 2007-10-20 01:34:40 +02:00
video Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
w1 Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
watchdog Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
xen Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
zorro Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
Kconfig mv watchdog tree under drivers 2007-10-18 10:39:03 +00:00
Makefile Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2007-10-19 13:12:46 -07:00