iommu/amd: Fix hotplug with iommu=pt
[cascardo/linux.git] / drivers / iommu / iommu.c
index 2198b2d..8b9ded8 100644 (file)
@@ -119,6 +119,7 @@ EXPORT_SYMBOL_GPL(iommu_present);
  * iommu_set_fault_handler() - set a fault handler for an iommu domain
  * @domain: iommu domain
  * @handler: fault handler
+ * @token: user data, will be passed back to the fault handler
  *
  * This function should be used by IOMMU users which want to be notified
  * whenever an IOMMU fault happens.
@@ -127,11 +128,13 @@ EXPORT_SYMBOL_GPL(iommu_present);
  * error code otherwise.
  */
 void iommu_set_fault_handler(struct iommu_domain *domain,
-                                       iommu_fault_handler_t handler)
+                                       iommu_fault_handler_t handler,
+                                       void *token)
 {
        BUG_ON(!domain);
 
        domain->handler = handler;
+       domain->handler_token = token;
 }
 EXPORT_SYMBOL_GPL(iommu_set_fault_handler);