@@ -2421,12 +2421,12 @@ static bool arm_smmu_ats_supported(struct arm_smmu_master *master)
2421
2421
return dev_is_pci (dev ) && pci_ats_supported (to_pci_dev (dev ));
2422
2422
}
2423
2423
2424
- static void arm_smmu_enable_ats (struct arm_smmu_master * master )
2424
+ static void arm_smmu_enable_ats (struct arm_smmu_master * master ,
2425
+ struct arm_smmu_domain * smmu_domain )
2425
2426
{
2426
2427
size_t stu ;
2427
2428
struct pci_dev * pdev ;
2428
2429
struct arm_smmu_device * smmu = master -> smmu ;
2429
- struct arm_smmu_domain * smmu_domain = master -> domain ;
2430
2430
2431
2431
/* Don't enable ATS at the endpoint if it's not enabled in the STE */
2432
2432
if (!master -> ats_enabled )
@@ -2442,10 +2442,9 @@ static void arm_smmu_enable_ats(struct arm_smmu_master *master)
2442
2442
dev_err (master -> dev , "Failed to enable ATS (STU %zu)\n" , stu );
2443
2443
}
2444
2444
2445
- static void arm_smmu_disable_ats (struct arm_smmu_master * master )
2445
+ static void arm_smmu_disable_ats (struct arm_smmu_master * master ,
2446
+ struct arm_smmu_domain * smmu_domain )
2446
2447
{
2447
- struct arm_smmu_domain * smmu_domain = master -> domain ;
2448
-
2449
2448
if (!master -> ats_enabled )
2450
2449
return ;
2451
2450
@@ -2514,7 +2513,7 @@ static void arm_smmu_detach_dev(struct arm_smmu_master *master)
2514
2513
if (!smmu_domain )
2515
2514
return ;
2516
2515
2517
- arm_smmu_disable_ats (master );
2516
+ arm_smmu_disable_ats (master , smmu_domain );
2518
2517
2519
2518
spin_lock_irqsave (& smmu_domain -> devices_lock , flags );
2520
2519
list_del (& master -> domain_head );
@@ -2636,7 +2635,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
2636
2635
break ;
2637
2636
}
2638
2637
2639
- arm_smmu_enable_ats (master );
2638
+ arm_smmu_enable_ats (master , smmu_domain );
2640
2639
goto out_unlock ;
2641
2640
2642
2641
out_list_del :
0 commit comments