diff options
author | Qi Liu <liuqi115@huawei.com> | 2021-04-01 19:19:16 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2021-04-07 10:47:41 +0200 |
commit | 3e84f878b56b075b9a81de6e73da7b3dc88387d8 (patch) | |
tree | 8164f13a1d7f0d1175a8d2a1fef4865b0e9e1c20 /drivers/iommu | |
parent | 1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff) |
iommu/amd: Remove duplicate check of pasids
Remove duplicate check of pasids in amd_iommu_domain_enable_v2(), as it
has been guaranteed in amd_iommu_init_device().
Signed-off-by: Qi Liu <liuqi115@huawei.com>
Link: https://lore.kernel.org/r/1617275956-4467-1-git-send-email-liuqi115@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd/iommu.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index a69a8b573e40..70814ab0b374 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2310,9 +2310,6 @@ int amd_iommu_domain_enable_v2(struct iommu_domain *dom, int pasids) unsigned long flags; int levels, ret; - if (pasids <= 0 || pasids > (PASID_MASK + 1)) - return -EINVAL; - /* Number of GCR3 table levels required */ for (levels = 0; (pasids - 1) & ~0x1ff; pasids >>= 9) levels += 1; |