Lines Matching refs:fault

1053  * iommu_register_device_fault_handler() - Register a device fault handler

1055 * @handler: the fault handler
1058 * When an IOMMU fault event is received, this handler gets called with the
1059 * fault event and data as argument. The handler should return 0 on success. If
1060 * the fault is recoverable (IOMMU_FAULT_PAGE_REQ), the consumer should also
1061 * complete the fault by calling iommu_page_response() with one of the following
1064 * - IOMMU_PAGE_RESP_INVALID: terminate the fault
1065 * - IOMMU_PAGE_RESP_FAILURE: terminate the fault and stop reporting
1068 * Return 0 if the fault handler was installed successfully, or an error.
1080 /* Only allow one fault handler registered for each device */
1106 * iommu_unregister_device_fault_handler() - Unregister the device fault handler
1109 * Remove the device fault handler installed with
1146 * iommu_report_device_fault() - Report fault event to device driver
1148 * @evt: fault event data
1150 * Called by IOMMU drivers when a fault is detected, typically in a threaded IRQ
1151 * handler. When this function fails and the fault is recoverable, it is the
1152 * caller's responsibility to complete the fault.
1167 /* we only report device fault if there is a handler registered */
1175 if (evt->fault.type == IOMMU_FAULT_PAGE_REQ && (evt->fault.prm.flags & IOMMU_FAULT_PAGE_REQUEST_LAST_PAGE)) {
1186 ret = fparam->handler(&evt->fault, fparam->data);
1221 /* Only send response if there is a fault report pending */
1233 prm = &evt->fault.prm;
1912 * iommu_set_fault_handler() - set a fault handler for an iommu domain
1914 * @handler: fault handler
1915 * @token: user data, will be passed back to the fault handler
1918 * whenever an IOMMU fault happens.
1920 * The fault handler itself should return 0 on success, and an appropriate
2738 * report_iommu_fault() - report about an IOMMU fault to the IOMMU framework
2739 * @domain: the iommu domain where the fault has happened
2740 * @dev: the device where the fault has happened
2742 * @flags: mmu fault flags (e.g. IOMMU_FAULT_READ/IOMMU_FAULT_WRITE/...)
2757 * Specifically, -ENOSYS is returned if a fault handler isn't installed
2758 * (though fault handlers can also return -ENOSYS, in case they want to
2766 * if upper layers showed interest and installed a fault handler,