iommu/s390: Add support for iommu_device handling
Add support for the iommu_device_register interface to make the s390 hardware iommus visible to the iommu core and in sysfs. Acked-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
@@ -776,6 +776,7 @@ void pcibios_remove_bus(struct pci_bus *bus)
|
||||
|
||||
zpci_exit_slot(zdev);
|
||||
zpci_cleanup_bus_resources(zdev);
|
||||
zpci_destroy_iommu(zdev);
|
||||
zpci_free_domain(zdev);
|
||||
|
||||
spin_lock(&zpci_list_lock);
|
||||
@@ -848,11 +849,15 @@ int zpci_create_device(struct zpci_dev *zdev)
|
||||
if (rc)
|
||||
goto out;
|
||||
|
||||
rc = zpci_init_iommu(zdev);
|
||||
if (rc)
|
||||
goto out_free;
|
||||
|
||||
mutex_init(&zdev->lock);
|
||||
if (zdev->state == ZPCI_FN_STATE_CONFIGURED) {
|
||||
rc = zpci_enable_device(zdev);
|
||||
if (rc)
|
||||
goto out_free;
|
||||
goto out_destroy_iommu;
|
||||
}
|
||||
rc = zpci_scan_bus(zdev);
|
||||
if (rc)
|
||||
@@ -869,6 +874,8 @@ int zpci_create_device(struct zpci_dev *zdev)
|
||||
out_disable:
|
||||
if (zdev->state == ZPCI_FN_STATE_ONLINE)
|
||||
zpci_disable_device(zdev);
|
||||
out_destroy_iommu:
|
||||
zpci_destroy_iommu(zdev);
|
||||
out_free:
|
||||
zpci_free_domain(zdev);
|
||||
out:
|
||||
|
Reference in New Issue
Block a user