@@ -323,7 +323,7 @@ static void remove_device_ref(struct device_domain_info *info, u32 win_cnt)
323
323
pamu_disable_liodn (info -> liodn );
324
324
spin_unlock_irqrestore (& iommu_lock , flags );
325
325
spin_lock_irqsave (& device_domain_lock , flags );
326
- info -> dev -> archdata . iommu_domain = NULL ;
326
+ dev_iommu_priv_set ( info -> dev , NULL ) ;
327
327
kmem_cache_free (iommu_devinfo_cache , info );
328
328
spin_unlock_irqrestore (& device_domain_lock , flags );
329
329
}
@@ -352,7 +352,7 @@ static void attach_device(struct fsl_dma_domain *dma_domain, int liodn, struct d
352
352
* Check here if the device is already attached to domain or not.
353
353
* If the device is already attached to a domain detach it.
354
354
*/
355
- old_domain_info = dev -> archdata . iommu_domain ;
355
+ old_domain_info = dev_iommu_priv_get ( dev ) ;
356
356
if (old_domain_info && old_domain_info -> domain != dma_domain ) {
357
357
spin_unlock_irqrestore (& device_domain_lock , flags );
358
358
detach_device (dev , old_domain_info -> domain );
@@ -371,8 +371,8 @@ static void attach_device(struct fsl_dma_domain *dma_domain, int liodn, struct d
371
371
* the info for the first LIODN as all
372
372
* LIODNs share the same domain
373
373
*/
374
- if (!dev -> archdata . iommu_domain )
375
- dev -> archdata . iommu_domain = info ;
374
+ if (!dev_iommu_priv_get ( dev ) )
375
+ dev_iommu_priv_set ( dev , info ) ;
376
376
spin_unlock_irqrestore (& device_domain_lock , flags );
377
377
}
378
378
0 commit comments