linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
	linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	guohanjun@huawei.com,
	Jean-Philippe Brucker <jean-philippe.brucker@arm.com>,
	Hulk Robot <hulkci@huawei.com>,
	robin.murphy@arm.com, joro@8bytes.org
Subject: Re: [PATCH RESEND] ACPI/IORT: Fix build error when IOMMU_SUPPORT disabled
Date: Wed, 15 May 2019 13:06:52 +0100	[thread overview]
Message-ID: <20190515120652.GA27269@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <20190515101534.GF24357@fuggles.cambridge.arm.com>

[+Joerg, Robin]

On Wed, May 15, 2019 at 11:15:34AM +0100, Will Deacon wrote:
> On Wed, May 15, 2019 at 11:42:53AM +0800, Kefeng Wang wrote:
> > 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
> > 
> > If IOMMU_SUPPORT not enabled, struct iommu_fwspec without members and
> > IOMMU_FWSPEC_PCI_RC_ATS not defined, add new iommu_fwspec_set_ats_flags()
> > to set IOMMU_FWSPEC_PCI_RC_ATS flags to solve build error.
> > 
> > Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
> > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Cc: Will Deacon <will.deacon@arm.com>
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> 
> What's this "Hulk Robot"? Does it report things publicly?

AFAIK it is Huawei CI system, I had some doubts about leaving
that tag for other patches I dealt with, I am not sure it is
really useful (other than giving Hulk some credit).

> Anyway, I can pick this up if Lorenzo acks it.

Actually I think we should compile out iort_iommu_configure() for
!IOMMU_SUPPORT unless I am missing something, so that we are
removing this source of errors.

If that does not cut it, for this patch:

iommu_fwspec_set_ats_flags() should be iommu_fwspec_set_ats_flag()

The commit log should be fixed (it is pretty weird to start with the
build error and then explain it):

"If IOMMU_SUPPORT is not enabled, struct iommu_fwspec is an empty
struct and IOMMU_FWSPEC_PCI_RC_ATS is not defined, resulting in
the following build error:

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

Add a iommu_fwspec_set_ats_flag() helper function (that is an empty
stub on !IOMMU_SUPPORT) to fix it."

  reply	other threads:[~2019-05-15 12:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 10:15   ` Will Deacon
2019-05-15 12:06     ` Lorenzo Pieralisi [this message]
2019-05-15 12:46       ` Robin Murphy
2019-05-15 16:41         ` Lorenzo Pieralisi
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

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=20190515120652.GA27269@e121166-lin.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=guohanjun@huawei.com \
    --cc=hulkci@huawei.com \
    --cc=jean-philippe.brucker@arm.com \
    --cc=joro@8bytes.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robin.murphy@arm.com \
    --cc=wangkefeng.wang@huawei.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).