mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Alex Williamson <alex.williamson@redhat.com>,
	Joerg Roedel <jroedel@suse.de>,
	linux-pci <linux-pci@vger.kernel.org>,
	iommu@lists.linux-foundation.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pci: Add dummy for pci_acs_enabled() if CONFIG_PCI=n to fix iommmu build
Date: Mon, 25 Sep 2017 11:13:44 -0500	[thread overview]
Message-ID: <20170925161344.GC15970@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <CAMuHMdU4atjKiddgtt-=jee1FSjt8cHVN2XGg1m+1TzaMytAUg@mail.gmail.com>

On Fri, Sep 22, 2017 at 08:12:46PM +0200, Geert Uytterhoeven wrote:
> Hi Björn,
> 
> On Fri, Sep 22, 2017 at 5:56 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Mon, Sep 11, 2017 at 02:29:15PM +0200, Geert Uytterhoeven wrote:
> >> If CONFIG_PCI=n, and gcc (e.g. 4.1.2) decides not to inline
> >> get_pci_function_alias_group(), the build fails with:
> >>
> >>     drivers/iommu/iommu.o: In function `get_pci_function_alias_group':
> >>     iommu.c:(.text+0xfdc): undefined reference to `pci_acs_enabled'
> >>
> >> Due to the various dummies for PCI calls in the CONFIG_PCI=n case,
> >> pci_acs_enabled() isn't actually ever called, but not all versions of
> >> gcc are smart enough to realize that.
> >>
> >> While explicitly marking get_pci_function_alias_group() inline would fix
> >> the build, this would inflate the code for the CONFIG_PCI=y case, as
> >> get_pci_function_alias_group() is a not-so-small function called from
> >> two places.
> >>
> >> Hence fix the issue by introducing a dummy for pci_acs_enabled()
> >> instead.
> >>
> >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> >
> > Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> >
> > Joerg, if you pick this up, would you mind capitalizing the subject
> > line to match the PCI convention, e.g.,
> >
> >   PCI: Add dummy pci_acs_enabled() for CONFIG_PCI=n build
> >
> > If it's too late for you to pick this up this week, I can include it
> > next week.  I assume this is not related to a specific change, i.e.,
> > it's not a regression?  Should it be marked for stable?
> 
> It was introduced by commit 0ae349a0f33fb040 ("iommu/qcom: Add qcom_iommu"),
> which enabled IOMMU support for compile-testing in e.g. allmodconfig on
> platforms that don't have IOMMUs.

I put this on my for-linus branch for v4.14 with Alex's reviewed-by.

Since 0ae349a0f33f was merged in the v4.14 merge window (it first
appeared in v4.14-rc1), I don't think we need to mark it for stable.

Bjorn

      reply	other threads:[~2017-09-25 16:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 12:29 Geert Uytterhoeven
2017-09-20 12:12 ` Joerg Roedel
2017-09-20 16:14 ` Alex Williamson
2017-09-22 15:56 ` Bjorn Helgaas
2017-09-22 17:51   ` Joerg Roedel
2017-09-22 18:12   ` Geert Uytterhoeven
2017-09-25 16:13     ` Bjorn Helgaas [this message]

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=20170925161344.GC15970@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=alex.williamson@redhat.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=geert@linux-m68k.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®