On 21/03/2019 16:00, Sinan Kaya wrote:
> On 3/20/2019 1:36 PM, Jean-Philippe Brucker wrote:
>>           err = pci_for_each_dma_alias(to_pci_dev(dev),
>>                            iort_pci_iommu_init, &info);
>> +
>> +        if (!err && !iort_pci_rc_supports_ats(node))
>> +            dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_NO_ATS;
> 
> Is it possible to remove !err check here. ATS supported is just a flag
> in IORT table. Does this decision have to rely on having a correct dma
> alias?

iort_pci_iommu_init() allocates and initializes dev->iommu_fwspec, so
checking !err ensures that dev->iommu_fwspec->flags is valid.

Thanks,
Jean
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to