summaryrefslogtreecommitdiffstats
path: root/include/linux/iommu.h
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge branches 'amd/fixes', 'debug/dma-api', 'arm/omap', 'arm/msm', 'core', ↵Joerg Roedel2011-10-211-10/+66
|\ \ | | | | | | | | | | | | | | | | | | | | | 'iommu/fault-reporting' and 'api/iommu-ops-per-bus' into next Conflicts: drivers/iommu/amd_iommu.c drivers/iommu/iommu.c
| | * iommu/core: Remove global iommu_ops and register_iommuJoerg Roedel2011-10-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | With all IOMMU drivers being converted to bus_set_iommu the global iommu_ops are no longer required. The same is true for the deprecated register_iommu function. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * iommu/core: Convert iommu_found to iommu_presentJoerg Roedel2011-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With per-bus iommu_ops the iommu_found function needs to work on a bus_type too. This patch adds a bus_type parameter to that function and converts all call-places. The function is also renamed to iommu_present because the function now checks if an iommu is present for a given bus and does not check for a global iommu anymore. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * iommu/core: Add bus_type parameter to iommu_domain_allocJoerg Roedel2011-10-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is necessary to store a pointer to the bus-specific iommu_ops in the iommu-domain structure. It will be used later to call into bus-specific iommu-ops. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * Driver core: Add iommu_ops to bus_typeJoerg Roedel2011-10-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the starting point to make the iommu_ops used for the iommu-api a per-bus-type structure. It is required to easily implement bus-specific setup in the iommu-layer. The first user will be the iommu-group attribute in sysfs. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * iommu/core: Define iommu_ops and register_iommu only with CONFIG_IOMMU_APIJoerg Roedel2011-10-211-5/+3
| |/ |/| | | | | | | | | | | This makes it impossible to compile an iommu driver into the kernel without selecting CONFIG_IOMMU_API. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| * iommu/core: let drivers know if an iommu fault handler isn't installedOhad Ben-Cohen2011-09-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Make report_iommu_fault() return -ENOSYS whenever an iommu fault handler isn't installed, so IOMMU drivers can then do their own platform-specific default behavior if they wanted. Fault handlers can still return -ENOSYS in case they want to elicit the default behavior of the IOMMU drivers. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| * iommu/core: Add fault reporting mechanismOhad Ben-Cohen2011-09-141-0/+51
|/ | | | | | | | | | | | | | | | | | | Add iommu fault report mechanism to the IOMMU API, so implementations could report about mmu faults (translation errors, hardware errors, etc..). Fault reports can be used in several ways: - mere logging - reset the device that accessed the faulting address (may be necessary in case the device is a remote processor for example) - implement dynamic PTE/TLB loading A dedicated iommu_set_fault_handler() API has been added to allow users, who are interested to receive such reports, to provide their handler. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu-api: Add missing header fileLaura Abbott2011-06-141-0/+2
| | | | | | | | If CONFIG_IOMMU_API is not defined some functions will just return -ENODEV. Add errno.h for the definition of ENODEV. Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu-api: Extension to check for interrupt remappingTom Lyon2010-07-191-0/+1
| | | | | | | | | | This patch allows IOMMU users to determine whether the hardware and software support safe, isolated interrupt remapping. Not all Intel IOMMUs have the hardware, and the software for AMD is not there yet. Signed-off-by: Tom Lyon <pugs@cisco.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu-api: Remove iommu_{un}map_range functionsJoerg Roedel2010-03-071-20/+0
| | | | | | | | | These functions are not longer used and can be removed savely. There functionality is now provided by the iommu_{un}map functions which are also capable of multiple page sizes. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu-api: Add ->{un}map callbacks to iommu_opsJoerg Roedel2010-03-071-0/+4
| | | | | | | | | This patch adds new callbacks for mapping and unmapping pages to the iommu_ops structure. These callbacks are aware of page sizes which makes them different to the ->{un}map_range callbacks. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu-api: Add iommu_map and iommu_unmap functionsJoerg Roedel2010-03-071-0/+16
| | | | | | | | | | | | | These two functions provide support for mapping and unmapping physical addresses to io virtual addresses. The difference to the iommu_(un)map_range() is that the new functions take a gfp_order parameter instead of a size. This allows the IOMMU backend implementations to detect easier if a given range can be mapped by larger page sizes. These new functions should replace the old ones in the long term. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu-api: Rename ->{un}map function pointers to ->{un}map_rangeJoerg Roedel2010-03-071-4/+4
| | | | | | | | | The new function pointer names match better with the top-level functions of the iommu-api which are using them. Main intention of this change is to make the ->{un}map pointer names free for two new mapping functions. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* intel-iommu: VT-d page table to support snooping control bitSheng Yang2009-03-241-0/+1
| | | | | | | The user can request to enable snooping control through VT-d page table. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* iommu: Add domain_has_cap iommu_opsSheng Yang2009-03-241-0/+12
| | | | | | | | | This iommu_op can tell if domain have a specific capability, like snooping control for Intel IOMMU, which can be used by other components of kernel to adjust the behaviour. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* introcude linux/iommu.h for an iommu apiJoerg Roedel2009-01-031-0/+112
This patch introduces the API to abstract the exported VT-d functions for KVM into a generic API. This way the AMD IOMMU implementation can plug into this API later. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
OpenPOWER on IntegriCloud