diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2011-09-27 07:36:40 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2011-09-30 16:40:32 +0200 |
commit | 0ed6d2d27bcc2ace454a8c55446e1bc3efd2d529 (patch) | |
tree | 0ed0c8f9878ee5a921ab69131e38a45864e2498f /drivers | |
parent | 30bd918c7132adddd370c79fd5619bf108efd702 (diff) | |
download | kernel_goldelico_gta04-0ed6d2d27bcc2ace454a8c55446e1bc3efd2d529.zip kernel_goldelico_gta04-0ed6d2d27bcc2ace454a8c55446e1bc3efd2d529.tar.gz kernel_goldelico_gta04-0ed6d2d27bcc2ace454a8c55446e1bc3efd2d529.tar.bz2 |
iommu/core: let drivers know if an iommu fault handler isn't installed
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/iommu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 3a07259..bd2d4d2 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -43,6 +43,12 @@ EXPORT_SYMBOL_GPL(iommu_found); * iommu_set_fault_handler() - set a fault handler for an iommu domain * @domain: iommu domain * @handler: fault handler + * + * This function should be used by IOMMU users which want to be notified + * whenever an IOMMU fault happens. + * + * The fault handler itself should return 0 on success, and an appropriate + * error code otherwise. */ void iommu_set_fault_handler(struct iommu_domain *domain, iommu_fault_handler_t handler) |