diff options
author | Joerg Roedel <jroedel@suse.de> | 2017-02-01 13:23:08 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-02-10 13:44:57 +0100 |
commit | b0119e870837dcd15a207b4701542ebac5d19b45 (patch) | |
tree | 07c547fed49f739a7d9b4a64c8163d9908db48e2 /drivers/iommu/amd_iommu_init.c | |
parent | c09e22d5370739e16463c113525df51b5980b1d5 (diff) | |
download | op-kernel-dev-b0119e870837dcd15a207b4701542ebac5d19b45.zip op-kernel-dev-b0119e870837dcd15a207b4701542ebac5d19b45.tar.gz |
iommu: Introduce new 'struct iommu_device'
This struct represents one hardware iommu in the iommu core
code. For now it only has the iommu-ops associated with it,
but that will be extended soon.
The register/unregister interface is also added, as well as
making use of it in the Intel and AMD IOMMU drivers.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 6799cf9..b7ccfb2 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -94,6 +94,8 @@ * out of it. */ +extern const struct iommu_ops amd_iommu_ops; + /* * structure describing one IOMMU in the ACPI table. Typically followed by one * or more ivhd_entrys. @@ -1639,6 +1641,9 @@ static int iommu_init_pci(struct amd_iommu *iommu) amd_iommu_groups, "ivhd%d", iommu->index); + iommu_device_set_ops(&iommu->iommu, &amd_iommu_ops); + iommu_device_register(&iommu->iommu); + return pci_enable_device(iommu->dev); } |