Skip to content

Commit 60c30aa

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/arm-smmu-v3: Enhance domain_alloc_user() to allocate PASID capable domain
Core layer is modified to call domain_alloc_user() to allocate PASID capable domain. Enhance arm_smmu_domain_alloc_user() to allocate PASID capable domain based on the 'flags' parameter. Signed-off-by: Vasant Hegde <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent b7a0855 commit 60c30aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,8 @@ arm_smmu_domain_alloc_user(struct device *dev, u32 flags,
30843084
const struct iommu_user_data *user_data)
30853085
{
30863086
struct arm_smmu_master *master = dev_iommu_priv_get(dev);
3087-
const u32 PAGING_FLAGS = IOMMU_HWPT_ALLOC_DIRTY_TRACKING;
3087+
const u32 PAGING_FLAGS = IOMMU_HWPT_ALLOC_DIRTY_TRACKING |
3088+
IOMMU_HWPT_ALLOC_PASID;
30883089
struct arm_smmu_domain *smmu_domain;
30893090
int ret;
30903091

@@ -3093,6 +3094,9 @@ arm_smmu_domain_alloc_user(struct device *dev, u32 flags,
30933094
if (parent || user_data)
30943095
return ERR_PTR(-EOPNOTSUPP);
30953096

3097+
if (flags & IOMMU_HWPT_ALLOC_PASID)
3098+
return arm_smmu_domain_alloc_paging(dev);
3099+
30963100
smmu_domain = arm_smmu_domain_alloc();
30973101
if (IS_ERR(smmu_domain))
30983102
return ERR_CAST(smmu_domain);

0 commit comments

Comments
 (0)