File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1609,6 +1609,17 @@ static void arm_smmu_get_resv_regions(struct device *dev,
1609
1609
iommu_dma_get_resv_regions (dev , head );
1610
1610
}
1611
1611
1612
+ static int arm_smmu_def_domain_type (struct device * dev )
1613
+ {
1614
+ struct arm_smmu_master_cfg * cfg = dev_iommu_priv_get (dev );
1615
+ const struct arm_smmu_impl * impl = cfg -> smmu -> impl ;
1616
+
1617
+ if (impl && impl -> def_domain_type )
1618
+ return impl -> def_domain_type (dev );
1619
+
1620
+ return 0 ;
1621
+ }
1622
+
1612
1623
static struct iommu_ops arm_smmu_ops = {
1613
1624
.capable = arm_smmu_capable ,
1614
1625
.domain_alloc = arm_smmu_domain_alloc ,
@@ -1627,6 +1638,7 @@ static struct iommu_ops arm_smmu_ops = {
1627
1638
.of_xlate = arm_smmu_of_xlate ,
1628
1639
.get_resv_regions = arm_smmu_get_resv_regions ,
1629
1640
.put_resv_regions = generic_iommu_put_resv_regions ,
1641
+ .def_domain_type = arm_smmu_def_domain_type ,
1630
1642
.pgsize_bitmap = -1UL , /* Restricted during device attach */
1631
1643
};
1632
1644
Original file line number Diff line number Diff line change @@ -386,6 +386,7 @@ struct arm_smmu_impl {
386
386
int (* init_context )(struct arm_smmu_domain * smmu_domain );
387
387
void (* tlb_sync )(struct arm_smmu_device * smmu , int page , int sync ,
388
388
int status );
389
+ int (* def_domain_type )(struct device * dev );
389
390
};
390
391
391
392
static inline void __iomem * arm_smmu_page (struct arm_smmu_device * smmu , int n )
You can’t perform that action at this time.
0 commit comments