Skip to content

Commit

Permalink
iommu: Remove wrong default domain comments
Browse files Browse the repository at this point in the history
These comments are wrong. request_default_domain_for_dev doesn't just
handle direct mapped domains.

Signed-off-by: Tom Murphy <murphyt7@tcd.ie>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Tom Murphy authored and Joerg Roedel committed Aug 30, 2019
1 parent 6b0c54e commit d127bc9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2200,7 +2200,6 @@ request_default_domain_for_dev(struct device *dev, unsigned long type)

mutex_lock(&group->mutex);

/* Check if the default domain is already direct mapped */
ret = 0;
if (group->default_domain && group->default_domain->type == type)
goto out;
Expand All @@ -2210,7 +2209,6 @@ request_default_domain_for_dev(struct device *dev, unsigned long type)
if (iommu_group_device_count(group) != 1)
goto out;

/* Allocate a direct mapped domain */
ret = -ENOMEM;
domain = __iommu_domain_alloc(dev->bus, type);
if (!domain)
Expand All @@ -2225,7 +2223,7 @@ request_default_domain_for_dev(struct device *dev, unsigned long type)

iommu_group_create_direct_mappings(group, dev);

/* Make the direct mapped domain the default for this group */
/* Make the domain the default for this group */
if (group->default_domain)
iommu_domain_free(group->default_domain);
group->default_domain = domain;
Expand Down

0 comments on commit d127bc9

Please sign in to comment.