mirror of https://github.com/torvalds/linux.git
iommu/amd: Set release_domain to blocked_domain
The set_dev_pasid for a release domain never gets called anyhow. So, there is no point in defining a separate release_domain from the blocked_domain. Simply reuse the blocked_domain. Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
parent
680a6a60fc
commit
c21b34762e
|
|
@ -2685,14 +2685,6 @@ void amd_iommu_init_identity_domain(void)
|
||||||
protection_domain_init(&identity_domain);
|
protection_domain_init(&identity_domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Same as blocked domain except it supports only ops->attach_dev() */
|
|
||||||
static struct iommu_domain release_domain = {
|
|
||||||
.type = IOMMU_DOMAIN_BLOCKED,
|
|
||||||
.ops = &(const struct iommu_domain_ops) {
|
|
||||||
.attach_dev = blocked_domain_attach_device,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static int amd_iommu_attach_device(struct iommu_domain *dom,
|
static int amd_iommu_attach_device(struct iommu_domain *dom,
|
||||||
struct device *dev)
|
struct device *dev)
|
||||||
{
|
{
|
||||||
|
|
@ -3042,7 +3034,7 @@ static const struct iommu_dirty_ops amd_dirty_ops = {
|
||||||
const struct iommu_ops amd_iommu_ops = {
|
const struct iommu_ops amd_iommu_ops = {
|
||||||
.capable = amd_iommu_capable,
|
.capable = amd_iommu_capable,
|
||||||
.blocked_domain = &blocked_domain,
|
.blocked_domain = &blocked_domain,
|
||||||
.release_domain = &release_domain,
|
.release_domain = &blocked_domain,
|
||||||
.identity_domain = &identity_domain.domain,
|
.identity_domain = &identity_domain.domain,
|
||||||
.domain_alloc_paging_flags = amd_iommu_domain_alloc_paging_flags,
|
.domain_alloc_paging_flags = amd_iommu_domain_alloc_paging_flags,
|
||||||
.domain_alloc_sva = amd_iommu_domain_alloc_sva,
|
.domain_alloc_sva = amd_iommu_domain_alloc_sva,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue