public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Guenter Roeck <linux@roeck-us.net>, Arnd Bergmann <arnd@arndb.de>,
	Will Deacon <will.deacon@arm.com>,
	Russell King <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Build failures in -next due to 'linux/io.h: Add pci_remap_cfgspace() interface'
Date: Mon, 24 Apr 2017 22:31:48 +0100	[thread overview]
Message-ID: <20170424213148.GB24434@red-moon> (raw)
In-Reply-To: <CAErSpo5Ek6V-n=gSfEncN4Bew6FG+QBQQPChZF3n4xtFM534PA@mail.gmail.com>

On Mon, Apr 24, 2017 at 02:18:09PM -0500, Bjorn Helgaas wrote:
> On Mon, Apr 24, 2017 at 3:56 AM, Lorenzo Pieralisi
> <lorenzo.pieralisi@arm.com> wrote:
> > On Sun, Apr 23, 2017 at 05:10:55PM -0700, Guenter Roeck wrote:
> >> Hi,
> >>
> >> -next fails to build for several architectures due to commit 'linux/io.h: Add
> >> pci_remap_cfgspace() interface'. Error message is
> >>
> >> include/linux/io.h: In function ‘pci_remap_cfgspace’:
> >> include/linux/io.h:108:9: error: implicit declaration of function ‘ioremap_nocache’
> >>
> >> Affected architectures (not necessarily a complete list):
> >>
> >> um
> >> score
> >> s390
> >>
> >> Bisect results for s390 and score are below. I did not bother to bisect
> >> the um build; the error message is the same.
> >
> > Sorry about that, kbuild did not catch those. Patch below should fix it
> > (tested it on um/s390); either I do that or I will have to remove the
> > static inline and make it a:
> >
> > #define pci_remap_cfgspace ioremap_nocache
> >
> > It is nice to see how consistent the ioremap interface is across arches :)
> >
> > Bjorn please let me know how you prefer fixing it, I will post a patch
> > accordingly.
> >
> > Lorenzo
> >
> > -- >8 --
> > diff --git a/include/linux/io.h b/include/linux/io.h
> > index 3934aba..2195d9e 100644
> > --- a/include/linux/io.h
> > +++ b/include/linux/io.h
> > @@ -90,6 +90,7 @@ void *devm_memremap(struct device *dev, resource_size_t offset,
> >
> >  void *__devm_memremap_pages(struct device *dev, struct resource *res);
> >
> > +#ifdef CONFIG_PCI
> >  /*
> >   * The PCI specifications (Rev 3.0, 3.2.5 "Transaction Ordering and
> >   * Posting") mandate non-posted configuration transactions. There is
> > @@ -108,6 +109,7 @@ static inline void __iomem *pci_remap_cfgspace(phys_addr_t offset,
> >         return ioremap_nocache(offset, size);
> >  }
> >  #endif
> > +#endif
> 
> I folded this #ifdef wrapper into the patch and updated my "next"
> branch.  Hopefully that's enough?

It is not ideal but it should be enough to the best of my knowledge,
I will keep testing it.

I am not sure there is a cleaner way to provide a default implementation
unless we resort to #define pci_remap_cfgspace ioremap_nocache instead
of the static inline version.

Thanks,
Lorenzo

      reply	other threads:[~2017-04-24 21:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  0:10 Build failures in -next due to 'linux/io.h: Add pci_remap_cfgspace() interface' Guenter Roeck
2017-04-24  8:56 ` Lorenzo Pieralisi
2017-04-24 19:18   ` Bjorn Helgaas
2017-04-24 21:31     ` Lorenzo Pieralisi [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=20170424213148.GB24434@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@roeck-us.net \
    --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