2017-04-24 00:11:07

by Guenter Roeck

[permalink] [raw]
Subject: Build failures in -next due to 'linux/io.h: Add pci_remap_cfgspace() interface'

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.

Guenter

---
# bad: [26e01a6fde2542bb020aa303787f8a57c49f5f37] Add linux-next specific files for 20170421
# good: [4f7d029b9bf009fbee76bb10c0c4351a1870d2f3] Linux 4.11-rc7
git bisect start 'HEAD' 'v4.11-rc7'
# bad: [6ab7468a254dabc88e73476b8fe9fee6d63041e1] Merge remote-tracking branch 'crypto/master'
git bisect bad 6ab7468a254dabc88e73476b8fe9fee6d63041e1
# bad: [140ff2fd79c3861f55628d9f9301dcf636f48371] Merge remote-tracking branch 'jc_docs/docs-next'
git bisect bad 140ff2fd79c3861f55628d9f9301dcf636f48371
# good: [972acb605b68d29d0914df41e75c1e549fb4dd4a] Merge remote-tracking branch 'arm64/for-next/core'
git bisect good 972acb605b68d29d0914df41e75c1e549fb4dd4a
# good: [dea37da5bb4803b7de2f1498d14f07444ca1adf3] Merge remote-tracking branch 'jfs/jfs-next'
git bisect good dea37da5bb4803b7de2f1498d14f07444ca1adf3
# bad: [f06a6bdb92e219efc51cdc36712596d713a1e8d4] Merge remote-tracking branch 'pci/next'
git bisect bad f06a6bdb92e219efc51cdc36712596d713a1e8d4
# good: [ef9daebd5027ace3669892d99536ca282af6fd54] Merge remote-tracking branch 'vfs/for-next'
git bisect good ef9daebd5027ace3669892d99536ca282af6fd54
# good: [9adda97fba38ebd3e28c8af226bc30ac6c9958ac] Merge branch 'pci/iommu' into next
git bisect good 9adda97fba38ebd3e28c8af226bc30ac6c9958ac
# bad: [7e8d8865f9a94ee1d811c2d689885296110f4fa5] Merge branch 'pci/pm' into next
git bisect bad 7e8d8865f9a94ee1d811c2d689885296110f4fa5
# bad: [64dad3832f071c309d07c379da26a73629d70373] PCI: keystone-dw: Update PCI config space remap function
git bisect bad 64dad3832f071c309d07c379da26a73629d70373
# bad: [1702b2c077780d0c2826c596f4910560d9c3cc9b] PCI: spear13xx: Update PCI config space remap function
git bisect bad 1702b2c077780d0c2826c596f4910560d9c3cc9b
# bad: [8f92689d79801a66919c0cb99b677dded3fc9ca7] devres: fix devm_ioremap_*() offset parameter kerneldoc description
git bisect bad 8f92689d79801a66919c0cb99b677dded3fc9ca7
# bad: [db1534d0f2047bcb19f3c39ef7feeeb6c8c88fc3] linux/io.h: Add pci_remap_cfgspace() interface
git bisect bad db1534d0f2047bcb19f3c39ef7feeeb6c8c88fc3
# good: [7b309aef0463340d3ad5449d1f605d14e10a4225] PCI: Remove __weak tag from pci_remap_iospace()
git bisect good 7b309aef0463340d3ad5449d1f605d14e10a4225
# first bad commit: [db1534d0f2047bcb19f3c39ef7feeeb6c8c88fc3] linux/io.h: Add pci_remap_cfgspace() interface

---
# bad: [26e01a6fde2542bb020aa303787f8a57c49f5f37] Add linux-next specific files for 20170421
# good: [4f7d029b9bf009fbee76bb10c0c4351a1870d2f3] Linux 4.11-rc7
git bisect start 'HEAD' 'v4.11-rc7'
# bad: [6ab7468a254dabc88e73476b8fe9fee6d63041e1] Merge remote-tracking branch 'crypto/master'
git bisect bad 6ab7468a254dabc88e73476b8fe9fee6d63041e1
# bad: [140ff2fd79c3861f55628d9f9301dcf636f48371] Merge remote-tracking branch 'jc_docs/docs-next'
git bisect bad 140ff2fd79c3861f55628d9f9301dcf636f48371
# good: [972acb605b68d29d0914df41e75c1e549fb4dd4a] Merge remote-tracking branch 'arm64/for-next/core'
git bisect good 972acb605b68d29d0914df41e75c1e549fb4dd4a
# good: [dea37da5bb4803b7de2f1498d14f07444ca1adf3] Merge remote-tracking branch 'jfs/jfs-next'
git bisect good dea37da5bb4803b7de2f1498d14f07444ca1adf3
# bad: [f06a6bdb92e219efc51cdc36712596d713a1e8d4] Merge remote-tracking branch 'pci/next'
git bisect bad f06a6bdb92e219efc51cdc36712596d713a1e8d4
# good: [ef9daebd5027ace3669892d99536ca282af6fd54] Merge remote-tracking branch 'vfs/for-next'
git bisect good ef9daebd5027ace3669892d99536ca282af6fd54
# good: [9adda97fba38ebd3e28c8af226bc30ac6c9958ac] Merge branch 'pci/iommu' into next
git bisect good 9adda97fba38ebd3e28c8af226bc30ac6c9958ac
# bad: [7e8d8865f9a94ee1d811c2d689885296110f4fa5] Merge branch 'pci/pm' into next
git bisect bad 7e8d8865f9a94ee1d811c2d689885296110f4fa5
# bad: [64dad3832f071c309d07c379da26a73629d70373] PCI: keystone-dw: Update PCI config space remap function
git bisect bad 64dad3832f071c309d07c379da26a73629d70373
# bad: [1702b2c077780d0c2826c596f4910560d9c3cc9b] PCI: spear13xx: Update PCI config space remap function
git bisect bad 1702b2c077780d0c2826c596f4910560d9c3cc9b
# bad: [8f92689d79801a66919c0cb99b677dded3fc9ca7] devres: fix devm_ioremap_*() offset parameter kerneldoc description
git bisect bad 8f92689d79801a66919c0cb99b677dded3fc9ca7
# bad: [db1534d0f2047bcb19f3c39ef7feeeb6c8c88fc3] linux/io.h: Add pci_remap_cfgspace() interface
git bisect bad db1534d0f2047bcb19f3c39ef7feeeb6c8c88fc3
# good: [7b309aef0463340d3ad5449d1f605d14e10a4225] PCI: Remove __weak tag from pci_remap_iospace()
git bisect good 7b309aef0463340d3ad5449d1f605d14e10a4225
# first bad commit: [db1534d0f2047bcb19f3c39ef7feeeb6c8c88fc3] linux/io.h: Add pci_remap_cfgspace() interface


2017-04-24 08:56:13

by Lorenzo Pieralisi

[permalink] [raw]
Subject: Re: Build failures in -next due to 'linux/io.h: Add pci_remap_cfgspace() interface'

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

/*
* Some systems do not have legacy ISA devices.

2017-04-24 19:18:40

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: Build failures in -next due to 'linux/io.h: Add pci_remap_cfgspace() interface'

On Mon, Apr 24, 2017 at 3:56 AM, Lorenzo Pieralisi
<[email protected]> 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?

Bjorn

2017-04-24 21:31:10

by Lorenzo Pieralisi

[permalink] [raw]
Subject: Re: Build failures in -next due to 'linux/io.h: Add pci_remap_cfgspace() interface'

On Mon, Apr 24, 2017 at 02:18:09PM -0500, Bjorn Helgaas wrote:
> On Mon, Apr 24, 2017 at 3:56 AM, Lorenzo Pieralisi
> <[email protected]> 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