powerpc: Fix build of 4xx simple platforms without CONFIG_PCI
Subsystems (2)
PATCH 1/1 powerpc: Fix build of 4xx simple platforms without CONFIG_PCI
The global ppc_pci_flags is not defined when CONFIG_PCI is not set, causing a link error
---
arch/powerpc/platforms/40x/ppc40x_simple.c | 2 ++ arch/powerpc/platforms/44x/ppc44x_simple.c | 2 ++ 2 files changed, 4 insertions(+)
arch/powerpc/platforms/40x/ppc40x_simple.c +2 -0
@@ -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 ; } }
arch/powerpc/platforms/44x/ppc44x_simple.c +2 -0
@@ -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 ; } }
Quoted 13 lines · Benjamin Herrenschmidt
The global
ppc_pci_flagsis not defined whenCONFIG_PCIis not set, causing a link errorSigned-off-by Benjamin Herrenschmidt <[email protected]>---
arch/powerpc/platforms/40x/ppc40x_simple.c | 2 ++ arch/powerpc/platforms/44x/ppc44x_simple.c | 2 ++ 2 files changed, 4 insertions(+)
arch/powerpc/platforms/40x/ppc40x_simple.c static int __init ppc40x_probe(void) · line 66
Quoted 6 lines
arch/powerpc/platforms/40x/ppc40x_simple.c +2
-0@@ -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
Signature · 8 lines
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
Quoted 13 lines
arch/powerpc/platforms/40x/ppc40x_simple.c static int __init ppc40x_probe(void) · line 66
Quoted 10 lines
arch/powerpc/platforms/40x/ppc40x_simple.c +2
-0@@ -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!
Quoted 4 lines
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.
Quoted 13 lines · On Mon, 08 Dec 2008 16:38:14 +1100 Benjamin Herrenschmidt…
Quoted 13 lines
arch/powerpc/platforms/40x/ppc40x_simple.c static int __init ppc40x_probe(void) · line 66
Quoted 10 lines
arch/powerpc/platforms/40x/ppc40x_simple.c +2
-0@@ -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!
Quoted 7 lines
Quoted 4 lines
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
Quoted 18 lines · On Wed, 10 Dec 2008 09:25:08 -0500 Josh Boyer <[email protected]>…
Quoted 15 lines · On Mon, 08 Dec 2008 16:38:14 +1100 Benjamin Herrenschmidt…
Quoted 15 lines
arch/powerpc/platforms/40x/ppc40x_simple.c static int __init ppc40x_probe(void) · line 66
Quoted 10 lines
arch/powerpc/platforms/40x/ppc40x_simple.c +2
-0@@ -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.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
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
Quoted 16 lines · Josh Boyer
Quoted 14 lines · On Mon, 08 Dec 2008 16:38:14 +1100 Benjamin Herrenschmidt…
Quoted 14 lines
arch/powerpc/platforms/40x/ppc40x_simple.c static int __init ppc40x_probe(void) · line 66
Quoted 9 lines
arch/powerpc/platforms/40x/ppc40x_simple.c +2
-0@@ -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.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
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.
Signature · 8 lines
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