* [PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI
@ 2008-12-08 4:53 Benjamin Herrenschmidt
2008-12-08 5:32 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2008-12-08 4:53 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
The global ppc_pci_flags is not defined when CONFIG_PCI is not
set, causing a link error
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/platforms/40x/ppc40x_simple.c | 2 ++
arch/powerpc/platforms/44x/ppc44x_simple.c | 2 ++
2 files changed, 4 insertions(+)
--- linux-work.orig/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:49.000000000 +1100
+++ linux-work/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:52.000000000 +1100
@@ -61,7 +61,9 @@ static int __init ppc40x_probe(void)
for (i = 0; i < ARRAY_SIZE(board); i++) {
if (of_flat_dt_is_compatible(root, board[i])) {
+#ifdef CONFIG_PCI
ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
+#endif
return 1;
}
}
Index: linux-work/arch/powerpc/platforms/44x/ppc44x_simple.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/44x/ppc44x_simple.c 2008-12-08 15:51:31.000000000 +1100
+++ linux-work/arch/powerpc/platforms/44x/ppc44x_simple.c 2008-12-08 15:51:39.000000000 +1100
@@ -70,7 +70,9 @@ static int __init ppc44x_probe(void)
for (i = 0; i < ARRAY_SIZE(board); i++) {
if (of_flat_dt_is_compatible(root, board[i])) {
+#ifdef CONFIG_PCI
ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
+#endif
return 1;
}
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI
2008-12-08 4:53 [PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI Benjamin Herrenschmidt
@ 2008-12-08 5:32 ` Michael Ellerman
2008-12-08 5:38 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2008-12-08 5:32 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1256 bytes --]
On Mon, 2008-12-08 at 15:53 +1100, Benjamin Herrenschmidt wrote:
> The global ppc_pci_flags is not defined when CONFIG_PCI is not
> set, causing a link error
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/powerpc/platforms/40x/ppc40x_simple.c | 2 ++
> arch/powerpc/platforms/44x/ppc44x_simple.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> --- linux-work.orig/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:49.000000000 +1100
> +++ linux-work/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:52.000000000 +1100
> @@ -61,7 +61,9 @@ static int __init ppc40x_probe(void)
>
> for (i = 0; i < ARRAY_SIZE(board); i++) {
> if (of_flat_dt_is_compatible(root, board[i])) {
> +#ifdef CONFIG_PCI
> ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
> +#endif
No! #ifdefs! in C code!
To the tune of you-know-what.
Looks like we need an accessor we can replace with an empty version in
the !PCI case.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI
2008-12-08 5:32 ` Michael Ellerman
@ 2008-12-08 5:38 ` Benjamin Herrenschmidt
2008-12-10 14:25 ` Josh Boyer
0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2008-12-08 5:38 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev
> > --- linux-work.orig/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:49.000000000 +1100
> > +++ linux-work/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:52.000000000 +1100
> > @@ -61,7 +61,9 @@ static int __init ppc40x_probe(void)
> >
> > for (i = 0; i < ARRAY_SIZE(board); i++) {
> > if (of_flat_dt_is_compatible(root, board[i])) {
> > +#ifdef CONFIG_PCI
> > ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
> > +#endif
>
> No! #ifdefs! in C code!
>
> To the tune of you-know-what.
>
> Looks like we need an accessor we can replace with an empty version in
> the !PCI case.
If you have plenty of time on your hands :-) In the meantime, this is a
build fix.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI
2008-12-08 5:38 ` Benjamin Herrenschmidt
@ 2008-12-10 14:25 ` Josh Boyer
2008-12-10 19:06 ` Josh Boyer
2008-12-10 21:59 ` Michael Ellerman
0 siblings, 2 replies; 6+ messages in thread
From: Josh Boyer @ 2008-12-10 14:25 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
On Mon, 08 Dec 2008 16:38:14 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > > --- linux-work.orig/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:49.000000000 +1100
> > > +++ linux-work/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:52.000000000 +1100
> > > @@ -61,7 +61,9 @@ static int __init ppc40x_probe(void)
> > >
> > > for (i = 0; i < ARRAY_SIZE(board); i++) {
> > > if (of_flat_dt_is_compatible(root, board[i])) {
> > > +#ifdef CONFIG_PCI
> > > ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
> > > +#endif
> >
> > No! #ifdefs! in C code!
> >
> > To the tune of you-know-what.
> >
> > Looks like we need an accessor we can replace with an empty version in
> > the !PCI case.
>
> If you have plenty of time on your hands :-) In the meantime, this is a
> build fix.
I have time. I hate ifdefs.
josh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI
2008-12-10 14:25 ` Josh Boyer
@ 2008-12-10 19:06 ` Josh Boyer
2008-12-10 21:59 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Josh Boyer @ 2008-12-10 19:06 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
On Wed, 10 Dec 2008 09:25:08 -0500
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> On Mon, 08 Dec 2008 16:38:14 +1100
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> >
> > > > --- linux-work.orig/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:49.000000000 +1100
> > > > +++ linux-work/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:52.000000000 +1100
> > > > @@ -61,7 +61,9 @@ static int __init ppc40x_probe(void)
> > > >
> > > > for (i = 0; i < ARRAY_SIZE(board); i++) {
> > > > if (of_flat_dt_is_compatible(root, board[i])) {
> > > > +#ifdef CONFIG_PCI
> > > > ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
> > > > +#endif
> > >
> > > No! #ifdefs! in C code!
> > >
> > > To the tune of you-know-what.
> > >
> > > Looks like we need an accessor we can replace with an empty version in
> > > the !PCI case.
> >
> > If you have plenty of time on your hands :-) In the meantime, this is a
> > build fix.
>
> I have time. I hate ifdefs.
Oh, and:
http://ozlabs.org/pipermail/linuxppc-dev/2007-December/048214.html
I told you so (sort of). Ha! ;)
josh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI
2008-12-10 14:25 ` Josh Boyer
2008-12-10 19:06 ` Josh Boyer
@ 2008-12-10 21:59 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2008-12-10 21:59 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]
On Wed, 2008-12-10 at 09:25 -0500, Josh Boyer wrote:
> On Mon, 08 Dec 2008 16:38:14 +1100
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > > > --- linux-work.orig/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:49.000000000 +1100
> > > > +++ linux-work/arch/powerpc/platforms/40x/ppc40x_simple.c 2008-12-08 15:51:52.000000000 +1100
> > > > @@ -61,7 +61,9 @@ static int __init ppc40x_probe(void)
> > > >
> > > > for (i = 0; i < ARRAY_SIZE(board); i++) {
> > > > if (of_flat_dt_is_compatible(root, board[i])) {
> > > > +#ifdef CONFIG_PCI
> > > > ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
> > > > +#endif
> > >
> > > No! #ifdefs! in C code!
> > >
> > > To the tune of you-know-what.
> > >
> > > Looks like we need an accessor we can replace with an empty version in
> > > the !PCI case.
> >
> > If you have plenty of time on your hands :-) In the meantime, this is a
> > build fix.
>
> I have time. I hate ifdefs.
You are awesome.
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-10 21:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08 4:53 [PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI Benjamin Herrenschmidt
2008-12-08 5:32 ` Michael Ellerman
2008-12-08 5:38 ` Benjamin Herrenschmidt
2008-12-10 14:25 ` Josh Boyer
2008-12-10 19:06 ` Josh Boyer
2008-12-10 21:59 ` Michael Ellerman
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).