* [PATCH 2/2] powerpc: Fix build without CONFIG_PCI
@ 2011-08-05 6:04 Benjamin Herrenschmidt
2011-08-05 7:37 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2011-08-05 6:04 UTC (permalink / raw)
To: linuxppc-dev
Commit fea80311a939a746533a6d7e7c3183729d6a3faf
"iomap: make IOPORT/PCI mapping functions conditional"
Broke powerpc build without CONFIG_PCI as we would still define
pci_iomap(), which overlaps with the new empty inline in the headers.
Make our implementation conditional on CONFIG_PCI
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/iomap.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index 1577434..faca64a 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -117,6 +117,7 @@ void ioport_unmap(void __iomem *addr)
EXPORT_SYMBOL(ioport_map);
EXPORT_SYMBOL(ioport_unmap);
+#ifdef CONFIG_PCI
void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
{
resource_size_t start = pci_resource_start(dev, bar);
@@ -143,6 +144,7 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
return;
iounmap(addr);
}
+#endif /* CONFIG_PCI */
EXPORT_SYMBOL(pci_iomap);
EXPORT_SYMBOL(pci_iounmap);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] powerpc: Fix build without CONFIG_PCI
2011-08-05 6:04 [PATCH 2/2] powerpc: Fix build without CONFIG_PCI Benjamin Herrenschmidt
@ 2011-08-05 7:37 ` Stephen Rothwell
2011-08-05 10:16 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2011-08-05 7:37 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
Hi Ben,
On Fri, 05 Aug 2011 16:04:07 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> Commit fea80311a939a746533a6d7e7c3183729d6a3faf
> "iomap: make IOPORT/PCI mapping functions conditional"
>
> Broke powerpc build without CONFIG_PCI as we would still define
> pci_iomap(), which overlaps with the new empty inline in the headers.
If we are using a static inline implementation for !CONFIG_PCI, then we
should probably not EXPORT it in that case either ...
> @@ -143,6 +144,7 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
> return;
> iounmap(addr);
> }
> +#endif /* CONFIG_PCI */
>
> EXPORT_SYMBOL(pci_iomap);
> EXPORT_SYMBOL(pci_iounmap);
--
Stephen Rothwell <sfr@canb.auug.org.au>
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] powerpc: Fix build without CONFIG_PCI
2011-08-05 7:37 ` Stephen Rothwell
@ 2011-08-05 10:16 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2011-08-05 10:16 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
On Fri, 2011-08-05 at 17:37 +1000, Stephen Rothwell wrote:
> Hi Ben,
>
> On Fri, 05 Aug 2011 16:04:07 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > Commit fea80311a939a746533a6d7e7c3183729d6a3faf
> > "iomap: make IOPORT/PCI mapping functions conditional"
> >
> > Broke powerpc build without CONFIG_PCI as we would still define
> > pci_iomap(), which overlaps with the new empty inline in the headers.
>
> If we are using a static inline implementation for !CONFIG_PCI, then we
> should probably not EXPORT it in that case either ...
Good point, interesting that my build test didn't catch it ... I'll
add another patch on top before I ask Linus to pull.
Cheers,
Ben.
> > @@ -143,6 +144,7 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
> > return;
> > iounmap(addr);
> > }
> > +#endif /* CONFIG_PCI */
> >
> > EXPORT_SYMBOL(pci_iomap);
> > EXPORT_SYMBOL(pci_iounmap);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-05 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-05 6:04 [PATCH 2/2] powerpc: Fix build without CONFIG_PCI Benjamin Herrenschmidt
2011-08-05 7:37 ` Stephen Rothwell
2011-08-05 10:16 ` Benjamin Herrenschmidt
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.