aboutsummaryrefslogtreecommitdiff
path: root/drivers/iommu
AgeCommit message (Collapse)Author
2011-09-05iommu/omap-iovmm: support non page-aligned buffers in iommu_vmapLaurent Pinchart
omap_iovmm requires page-aligned buffers, and that sometimes causes omap3isp failures (i.e. whenever the buffer passed from userspace is not page-aligned). Remove this limitation by rounding the address of the first page entry down, and adding the offset back to the device address. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [ohad@wizery.com: rebased, but tested only with aligned buffers] [ohad@wizery.com: slightly edited the commit log] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-09-02iommu/amd: Don't take domain->lock recursivlyJoerg Roedel
The domain_flush_devices() function takes the domain->lock. But this function is only called from update_domain() which itself is already called unter the domain->lock. This causes a deadlock situation when the dma-address-space of a domain grows larger than 1GB. Cc: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-09-02iommu/amd: Make sure iommu->need_sync contains correct valueJoerg Roedel
The value is only set to true but never set back to false, which causes to many completion-wait commands to be sent to hardware. Fix it with this patch. Cc: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-29iommu: omap: add Kconfig OMAP dependencyOhad Ben-Cohen
Make CONFIG_OMAP_IOMMU depend on CONFIG_ARCH_OMAP so other allmodconfig builds won't fail. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: Fix up mutex->spin_lock conversion of iommu_lockJoerg Roedel
The omap_iommu_set_isr() was still using the mutex functions but the iommu_lock was converted to a spin_lock. Fix that up. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: omapify 'struct iommu' and exposed APIOhad Ben-Cohen
Prepend 'omap_' to OMAP's 'struct iommu' and exposed API, to prevent namespace pollution and generally to improve readability of the code that still uses the driver directly. Update the users as needed as well. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: remove unused exported APIOhad Ben-Cohen
Remove unused public APIs from OMAP's iommu driver. IOMMU functionality should be exposed only via the generic IOMMU API; this way drivers stay generic, and different IOMMU drivers don't need to duplicate similar functionalities. The rest of the API still exposed by OMAP's iommu will be evaluated and eventually either added to the generic IOMMU API (if relevant), or completely removed. The intention is that OMAP's iommu driver will eventually not expose any public API. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iovmm: remove unused functionalityOhad Ben-Cohen
Remove unused functionality from OMAP's iovmm module. The intention is to eventually completely replace iovmm with the generic DMA-API, so new code that'd need this iovmm functionality will have to extend the DMA-API instead. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: PREFETCH_IOTLB cleanupOhad Ben-Cohen
Use PREFETCH_IOTLB to control the content of the called function, instead of inlining it in the code. This improves readability of the code, and also prevents an "unused function" warning to show up when PREFETCH_IOTLB isn't set. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu: stop exporting local functionsOhad Ben-Cohen
Stop exporting functions that are used only within the iommu driver itself. Eventually OMAP's iommu driver should only expose API via the generic IOMMU framework. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-08-26omap: iommu/iovmm: move to dedicated iommu folderOhad Ben-Cohen
Move OMAP's iommu drivers to the dedicated iommu drivers folder. While OMAP's iovmm (virtual memory manager) driver does not strictly belong to the iommu drivers folder, move it there as well, because it's by no means OMAP-specific (in concept. technically it is still coupled with OMAP's iommu). Eventually, iovmm will be completely replaced with the generic, iommu-based, dma-mapping API. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-07-06iommu/amd: Don't use MSI address range for DMA addressesJoerg Roedel
Reserve the MSI address range in the address allocator so that MSI addresses are not handed out as dma handles. Cc: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-06-21Merge branches 'amd/transparent-bridge' and 'core'Joerg Roedel
Conflicts: arch/x86/include/asm/amd_iommu_types.h arch/x86/kernel/amd_iommu.c Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-06-21iommu/amd: Move missing parts to drivers/iommuJoerg Roedel
A few parts of the driver were missing in drivers/iommu. Move them there to have the complete driver in that directory. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-06-21iommu: Move iommu Kconfig entries to submenuJoerg Roedel
For better navigation this patch moves the drivers/iommu drivers into its own submenu in Kconfig. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-06-21x86/ia64: intel-iommu: move to drivers/iommu/Ohad Ben-Cohen
This should ease finding similarities with different platforms, with the intention of solving problems once in a generic framework which everyone can use. Note: to move intel-iommu.c, the declaration of pci_find_upstream_pcie_bridge() has to move from drivers/pci/pci.h to include/linux/pci.h. This is handled in this patch, too. As suggested, also drop DMAR's EXPERIMENTAL tag while we're at it. Compile-tested on x86_64. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-06-21x86: amd_iommu: move to drivers/iommu/Ohad Ben-Cohen
This should ease finding similarities with different platforms, with the intention of solving problems once in a generic framework which everyone can use. Compile-tested on x86_64. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-06-21msm: iommu: move to drivers/iommu/Ohad Ben-Cohen
This should ease finding similarities with different platforms, with the intention of solving problems once in a generic framework which everyone can use. Compile-tested for MSM8X60. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: David Brown <davidb@codeaurora.org> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-06-14drivers: iommu: move to a dedicated folderOhad Ben-Cohen
Create a dedicated folder for iommu drivers, and move the base iommu implementation over there. Grouping the various iommu drivers in a single location will help finding similar problems shared by different platforms, so they could be solved once, in the iommu framework, instead of solved differently (or duplicated) in each driver. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>