Lorenzo Pieralisi 8212688600 ACPI/IORT: Fix build error when IOMMU_SUPPORT is disabled
If IOMMU_SUPPORT is not enabled (and therefore IOMMU_API is not
selected), struct iommu_fwspec is an empty struct and
IOMMU_FWSPEC_PCI_RC_ATS is not defined, resulting in the following
compilation errors:

drivers/acpi/arm64/iort.c: In function iort_iommu_configure:
drivers/acpi/arm64/iort.c:1079:21: error: struct iommu_fwspec has no member named flag:
    dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS;
                     ^~
drivers/acpi/arm64/iort.c:1079:32: error: IOMMU_FWSPEC_PCI_RC_ATS
undeclared (first use in this function)
    dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS;
                                ^~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/arm64/iort.c:1079:32: note: each undeclared identifier is reported only once for each function it appears in

Move iort_iommu_configure() (and the helpers functions it relies on)
into CONFIG_IOMMU_API preprocessor guarded code so that when
CONFIG_IOMMU_SUPPORT is not enabled we prevent compiling code that is
basically equivalent to no-OP, fixing the build errors.

Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/linux-arm-kernel/20190515034253.79348-1-wangkefeng.wang@huawei.com/
Fixes: 5702ee24182f ("ACPI/IORT: Check ATS capability in root complex nodes")
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-05-23 11:38:11 +01:00
..
2019-05-16 19:08:15 -07:00
2019-05-16 19:08:15 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 08:31:32 -07:00
2019-05-15 18:56:50 -07:00
2019-05-09 08:51:45 -07:00
2019-05-16 09:19:14 -07:00
2019-05-07 08:50:40 -07:00
2019-05-16 08:31:32 -07:00
2019-05-14 10:39:08 -07:00
2019-05-07 12:56:19 -07:00
2019-05-15 18:56:50 -07:00
2019-05-16 19:08:15 -07:00
2019-05-16 09:19:14 -07:00
2019-05-09 08:40:55 -07:00
2019-05-14 10:30:10 -07:00
2019-05-08 10:03:52 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 10:39:08 -07:00
2019-05-14 19:52:51 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 09:19:14 -07:00
2019-05-16 11:57:16 -07:00
2019-05-16 09:19:14 -07:00
2019-05-14 14:12:59 -07:00
2019-05-07 13:39:22 -07:00
2019-05-16 08:31:32 -07:00
2019-05-15 18:44:52 -07:00