From: Kefeng Wang <wangkefeng.wang@huawei.com> To: <linux-acpi@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Cc: <guohanjun@huawei.com>, Kefeng Wang <wangkefeng.wang@huawei.com>, Jean-Philippe Brucker <jean-philippe.brucker@arm.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Will Deacon <will.deacon@arm.com> Subject: [PATCH] ACPI/IORT: Fix build error when IOMMU_SUPPORT disabled Date: Wed, 15 May 2019 11:34:06 +0800 [thread overview] Message-ID: <20190515033406.79020-1-wangkefeng.wang@huawei.com> (raw) 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 flags 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 Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Will Deacon <will.deacon@arm.com> Fixes: 5702ee24182f ("ACPI/IORT: Check ATS capability in root complex nodes") Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- drivers/acpi/arm64/iort.c | 2 +- include/linux/iommu.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index 9058cb084b91..4ccf0dd99852 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -1076,7 +1076,7 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) iort_pci_iommu_init, &info); if (!err && iort_pci_rc_supports_ats(node)) - dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; + iommu_fwspec_set_ats_flags(dev); } else { int i = 0; diff --git a/include/linux/iommu.h b/include/linux/iommu.h index a815cf6f6f47..0a84556c0eb6 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -479,6 +479,11 @@ static inline void dev_iommu_fwspec_set(struct device *dev, dev->iommu_fwspec = fwspec; } +static inline void iommu_fwspec_set_ats_flags(struct device *dev) +{ + dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; +} + int iommu_probe_device(struct device *dev); void iommu_release_device(struct device *dev); @@ -770,6 +775,10 @@ static inline void iommu_fwspec_free(struct device *dev) { } +static inline void iommu_fwspec_set_ats_flags(struct device *dev) +{ +} + static inline int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids) { -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Kefeng Wang <wangkefeng.wang@huawei.com> To: <linux-acpi@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>, Kefeng Wang <wangkefeng.wang@huawei.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Will Deacon <will.deacon@arm.com>, guohanjun@huawei.com Subject: [PATCH] ACPI/IORT: Fix build error when IOMMU_SUPPORT disabled Date: Wed, 15 May 2019 11:34:06 +0800 [thread overview] Message-ID: <20190515033406.79020-1-wangkefeng.wang@huawei.com> (raw) 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 flags 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 Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Will Deacon <will.deacon@arm.com> Fixes: 5702ee24182f ("ACPI/IORT: Check ATS capability in root complex nodes") Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- drivers/acpi/arm64/iort.c | 2 +- include/linux/iommu.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index 9058cb084b91..4ccf0dd99852 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -1076,7 +1076,7 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) iort_pci_iommu_init, &info); if (!err && iort_pci_rc_supports_ats(node)) - dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; + iommu_fwspec_set_ats_flags(dev); } else { int i = 0; diff --git a/include/linux/iommu.h b/include/linux/iommu.h index a815cf6f6f47..0a84556c0eb6 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -479,6 +479,11 @@ static inline void dev_iommu_fwspec_set(struct device *dev, dev->iommu_fwspec = fwspec; } +static inline void iommu_fwspec_set_ats_flags(struct device *dev) +{ + dev->iommu_fwspec->flags |= IOMMU_FWSPEC_PCI_RC_ATS; +} + int iommu_probe_device(struct device *dev); void iommu_release_device(struct device *dev); @@ -770,6 +775,10 @@ static inline void iommu_fwspec_free(struct device *dev) { } +static inline void iommu_fwspec_set_ats_flags(struct device *dev) +{ +} + static inline int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids) { -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-05-15 3:25 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-15 3:34 Kefeng Wang [this message] 2019-05-15 3:34 ` [PATCH] ACPI/IORT: Fix build error when IOMMU_SUPPORT disabled Kefeng Wang 2019-05-15 3:42 ` [PATCH RESEND] " Kefeng Wang 2019-05-15 3:42 ` Kefeng Wang 2019-05-15 10:15 ` Will Deacon 2019-05-15 10:15 ` Will Deacon 2019-05-15 12:06 ` Lorenzo Pieralisi 2019-05-15 12:06 ` Lorenzo Pieralisi 2019-05-15 12:46 ` Robin Murphy 2019-05-15 12:46 ` Robin Murphy 2019-05-15 16:41 ` Lorenzo Pieralisi 2019-05-15 16:41 ` Lorenzo Pieralisi 2019-05-16 1:39 ` Kefeng Wang 2019-05-16 1:39 ` Kefeng Wang 2019-05-16 15:52 ` [PATCH v2] ACPI/IORT: Fix build error when IOMMU_SUPPORT is disabled Lorenzo Pieralisi 2019-05-16 15:52 ` Lorenzo Pieralisi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190515033406.79020-1-wangkefeng.wang@huawei.com \ --to=wangkefeng.wang@huawei.com \ --cc=guohanjun@huawei.com \ --cc=jean-philippe.brucker@arm.com \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.