]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu-v3: Fix build error without CONFIG_PCI_ATS
authorYueHaibing <yuehaibing@huawei.com>
Tue, 3 Sep 2019 06:50:56 +0000 (14:50 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 3 Sep 2019 12:58:20 +0000 (14:58 +0200)
commit7994e4d3c1eddf23d44302b76f8a7a2ccf5b800c
treeb0dc862404b5e56a5791705ab2bd5597a81fd5d6
parent6a3738961d2e00dcc874b2b74ce836d9c4179a5e
iommu/arm-smmu-v3: Fix build error without CONFIG_PCI_ATS

If CONFIG_PCI_ATS is not set, building fails:

drivers/iommu/arm-smmu-v3.c: In function arm_smmu_ats_supported:
drivers/iommu/arm-smmu-v3.c:2325:35: error: struct pci_dev has no member named ats_cap; did you mean msi_cap?
  return !pdev->untrusted && pdev->ats_cap;
                                   ^~~~~~~

ats_cap should only used when CONFIG_PCI_ATS is defined,
so use #ifdef block to guard this.

Fixes: add54b2dfcca ("iommu/arm-smmu-v3: Rework enabling/disabling of ATS for PCI masters")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/arm-smmu-v3.c