1
linux/drivers/pci
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
..
hotplug Get rid of unused variable warning in drivers/pci/hotplug/pci_hotplug_core.c 2007-10-15 09:07:58 -07:00
pcie pci: implement "pci=noaer" 2007-10-12 15:03:17 -07:00
.gitignore
access.c
bus.c
dmar.c Intel IOMMU: DMAR detection and parsing logic 2007-10-22 08:13:18 -07:00
hotplug.c Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
htirq.c
intel-iommu.c intel-iommu: optimize sg map/unmap calls 2007-10-22 08:13:19 -07:00
intel-iommu.h Intel IOMMU: Iommu Gfx workaround 2007-10-22 08:13:19 -07:00
iova.c intel-iommu: optimize sg map/unmap calls 2007-10-22 08:13:19 -07:00
iova.h intel-iommu: optimize sg map/unmap calls 2007-10-22 08:13:19 -07:00
Kconfig
Makefile Intel IOMMU: Intel IOMMU driver 2007-10-22 08:13:18 -07:00
msi.c MSI: Use correct data offset for 32-bit MSI in read_msi_msg() 2007-10-12 15:03:17 -07:00
msi.h
pci-acpi.c ACPI: restore CONFIG_ACPI_SLEEP 2007-07-29 16:53:59 -07:00
pci-driver.c Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-10-12 15:50:23 -07:00
pci-sysfs.c Remove capability.h from mm.h 2007-07-16 09:05:45 -07:00
pci.c more trivial signedness fixes in drivers 2007-10-14 12:41:52 -07:00
pci.h Intel IOMMU: PCI generic helper function 2007-10-22 08:13:18 -07:00
probe.c Intel IOMMU: PCI generic helper function 2007-10-22 08:13:18 -07:00
proc.c pci: write file size to inode on proc bus file write 2007-10-12 15:03:17 -07:00
quirks.c PCI: re-enable onboard sound on "MSI K8T Neo2-FIR" 2007-10-12 15:03:16 -07:00
remove.c
rom.c [IA64] SN: Correct ROM resource length for BIOS copy 2007-07-09 13:37:18 -07:00
search.c Intel IOMMU: PCI generic helper function 2007-10-22 08:13:18 -07:00
setup-bus.c PCI: remove transparent bridge sizing 2007-10-12 15:03:17 -07:00
setup-irq.c kobjects: fix up improper use of the kobject name field 2007-10-12 14:51:02 -07:00
setup-res.c
syscall.c pci syscall.c: Switch to refcounting API 2007-07-11 16:02:07 -07:00