diff options
author | Kyle Moffett <Kyle.D.Moffett@boeing.com> | 2011-12-02 01:27:58 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-06 21:43:06 -0500 |
commit | 582d3e099413c3741a88bdee9e3ff3cc2f9d3329 (patch) | |
tree | 1147f4ef9d3e5b64c56f7c83f69ce8d4f16b0988 | |
parent | fa8cbaaf5a68f62db3f9a8444ecbb940b47984cb (diff) |
powerpc/85xx: Move mpc85xx_smp_init() decl to a new "smp.h"
This removes a bunch of "extern" declarations and CONFIG_SMP ifdefs.
Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/85xx/corenet_ds.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_mds.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p1022_ds.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/p1023_rds.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/smp.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/smp.h | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/xes_mpc85xx.c | 6 |
9 files changed, 23 insertions, 40 deletions
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c index c48b66187dda..30528219b274 100644 --- a/arch/powerpc/platforms/85xx/corenet_ds.c +++ b/arch/powerpc/platforms/85xx/corenet_ds.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/of_platform.h> | 31 | #include <linux/of_platform.h> |
32 | #include <sysdev/fsl_soc.h> | 32 | #include <sysdev/fsl_soc.h> |
33 | #include <sysdev/fsl_pci.h> | 33 | #include <sysdev/fsl_pci.h> |
34 | #include "smp.h" | ||
34 | 35 | ||
35 | void __init corenet_ds_pic_init(void) | 36 | void __init corenet_ds_pic_init(void) |
36 | { | 37 | { |
@@ -65,10 +66,6 @@ void __init corenet_ds_pic_init(void) | |||
65 | /* | 66 | /* |
66 | * Setup the architecture | 67 | * Setup the architecture |
67 | */ | 68 | */ |
68 | #ifdef CONFIG_SMP | ||
69 | void __init mpc85xx_smp_init(void); | ||
70 | #endif | ||
71 | |||
72 | void __init corenet_ds_setup_arch(void) | 69 | void __init corenet_ds_setup_arch(void) |
73 | { | 70 | { |
74 | #ifdef CONFIG_PCI | 71 | #ifdef CONFIG_PCI |
@@ -77,9 +74,7 @@ void __init corenet_ds_setup_arch(void) | |||
77 | #endif | 74 | #endif |
78 | dma_addr_t max = 0xffffffff; | 75 | dma_addr_t max = 0xffffffff; |
79 | 76 | ||
80 | #ifdef CONFIG_SMP | ||
81 | mpc85xx_smp_init(); | 77 | mpc85xx_smp_init(); |
82 | #endif | ||
83 | 78 | ||
84 | #ifdef CONFIG_PCI | 79 | #ifdef CONFIG_PCI |
85 | for_each_node_by_type(np, "pci") { | 80 | for_each_node_by_type(np, "pci") { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 2113120c5a7d..3f66631103c0 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <sysdev/fsl_soc.h> | 36 | #include <sysdev/fsl_soc.h> |
37 | #include <sysdev/fsl_pci.h> | 37 | #include <sysdev/fsl_pci.h> |
38 | #include "smp.h" | ||
38 | 39 | ||
39 | #include "mpc85xx.h" | 40 | #include "mpc85xx.h" |
40 | 41 | ||
@@ -154,9 +155,6 @@ static int mpc85xx_exclude_device(struct pci_controller *hose, | |||
154 | /* | 155 | /* |
155 | * Setup the architecture | 156 | * Setup the architecture |
156 | */ | 157 | */ |
157 | #ifdef CONFIG_SMP | ||
158 | extern void __init mpc85xx_smp_init(void); | ||
159 | #endif | ||
160 | static void __init mpc85xx_ds_setup_arch(void) | 158 | static void __init mpc85xx_ds_setup_arch(void) |
161 | { | 159 | { |
162 | #ifdef CONFIG_PCI | 160 | #ifdef CONFIG_PCI |
@@ -189,9 +187,7 @@ static void __init mpc85xx_ds_setup_arch(void) | |||
189 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 187 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
190 | #endif | 188 | #endif |
191 | 189 | ||
192 | #ifdef CONFIG_SMP | ||
193 | mpc85xx_smp_init(); | 190 | mpc85xx_smp_init(); |
194 | #endif | ||
195 | 191 | ||
196 | #ifdef CONFIG_SWIOTLB | 192 | #ifdef CONFIG_SWIOTLB |
197 | if (memblock_end_of_DRAM() > max) { | 193 | if (memblock_end_of_DRAM() > max) { |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 495cfd988c1a..813b5d3a435f 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <asm/qe_ic.h> | 51 | #include <asm/qe_ic.h> |
52 | #include <asm/mpic.h> | 52 | #include <asm/mpic.h> |
53 | #include <asm/swiotlb.h> | 53 | #include <asm/swiotlb.h> |
54 | #include "smp.h" | ||
54 | 55 | ||
55 | #include "mpc85xx.h" | 56 | #include "mpc85xx.h" |
56 | 57 | ||
@@ -155,10 +156,6 @@ static int mpc8568_mds_phy_fixups(struct phy_device *phydev) | |||
155 | * Setup the architecture | 156 | * Setup the architecture |
156 | * | 157 | * |
157 | */ | 158 | */ |
158 | #ifdef CONFIG_SMP | ||
159 | extern void __init mpc85xx_smp_init(void); | ||
160 | #endif | ||
161 | |||
162 | #ifdef CONFIG_QUICC_ENGINE | 159 | #ifdef CONFIG_QUICC_ENGINE |
163 | static void __init mpc85xx_mds_reset_ucc_phys(void) | 160 | static void __init mpc85xx_mds_reset_ucc_phys(void) |
164 | { | 161 | { |
@@ -363,9 +360,7 @@ static void __init mpc85xx_mds_setup_arch(void) | |||
363 | } | 360 | } |
364 | #endif | 361 | #endif |
365 | 362 | ||
366 | #ifdef CONFIG_SMP | ||
367 | mpc85xx_smp_init(); | 363 | mpc85xx_smp_init(); |
368 | #endif | ||
369 | 364 | ||
370 | mpc85xx_mds_qe_init(); | 365 | mpc85xx_mds_qe_init(); |
371 | 366 | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index 9feccbbd4d96..b1ca429a5158 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <sysdev/fsl_soc.h> | 30 | #include <sysdev/fsl_soc.h> |
31 | #include <sysdev/fsl_pci.h> | 31 | #include <sysdev/fsl_pci.h> |
32 | #include "smp.h" | ||
32 | 33 | ||
33 | #include "mpc85xx.h" | 34 | #include "mpc85xx.h" |
34 | 35 | ||
@@ -84,9 +85,6 @@ void __init mpc85xx_rdb_pic_init(void) | |||
84 | /* | 85 | /* |
85 | * Setup the architecture | 86 | * Setup the architecture |
86 | */ | 87 | */ |
87 | #ifdef CONFIG_SMP | ||
88 | extern void __init mpc85xx_smp_init(void); | ||
89 | #endif | ||
90 | static void __init mpc85xx_rdb_setup_arch(void) | 88 | static void __init mpc85xx_rdb_setup_arch(void) |
91 | { | 89 | { |
92 | #ifdef CONFIG_PCI | 90 | #ifdef CONFIG_PCI |
@@ -104,10 +102,7 @@ static void __init mpc85xx_rdb_setup_arch(void) | |||
104 | 102 | ||
105 | #endif | 103 | #endif |
106 | 104 | ||
107 | #ifdef CONFIG_SMP | ||
108 | mpc85xx_smp_init(); | 105 | mpc85xx_smp_init(); |
109 | #endif | ||
110 | |||
111 | printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n"); | 106 | printk(KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n"); |
112 | } | 107 | } |
113 | 108 | ||
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c index 2bf4342ab656..8d5c22bfdd2e 100644 --- a/arch/powerpc/platforms/85xx/p1022_ds.c +++ b/arch/powerpc/platforms/85xx/p1022_ds.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <sysdev/fsl_soc.h> | 26 | #include <sysdev/fsl_soc.h> |
27 | #include <sysdev/fsl_pci.h> | 27 | #include <sysdev/fsl_pci.h> |
28 | #include <asm/fsl_guts.h> | 28 | #include <asm/fsl_guts.h> |
29 | #include "smp.h" | ||
29 | 30 | ||
30 | #include "mpc85xx.h" | 31 | #include "mpc85xx.h" |
31 | 32 | ||
@@ -268,10 +269,6 @@ void __init p1022_ds_pic_init(void) | |||
268 | mpic_init(mpic); | 269 | mpic_init(mpic); |
269 | } | 270 | } |
270 | 271 | ||
271 | #ifdef CONFIG_SMP | ||
272 | void __init mpc85xx_smp_init(void); | ||
273 | #endif | ||
274 | |||
275 | /* | 272 | /* |
276 | * Setup the architecture | 273 | * Setup the architecture |
277 | */ | 274 | */ |
@@ -311,9 +308,7 @@ static void __init p1022_ds_setup_arch(void) | |||
311 | diu_ops.valid_monitor_port = p1022ds_valid_monitor_port; | 308 | diu_ops.valid_monitor_port = p1022ds_valid_monitor_port; |
312 | #endif | 309 | #endif |
313 | 310 | ||
314 | #ifdef CONFIG_SMP | ||
315 | mpc85xx_smp_init(); | 311 | mpc85xx_smp_init(); |
316 | #endif | ||
317 | 312 | ||
318 | #ifdef CONFIG_SWIOTLB | 313 | #ifdef CONFIG_SWIOTLB |
319 | if (memblock_end_of_DRAM() > max) { | 314 | if (memblock_end_of_DRAM() > max) { |
diff --git a/arch/powerpc/platforms/85xx/p1023_rds.c b/arch/powerpc/platforms/85xx/p1023_rds.c index e76c4dceee23..57c3e0f32e9d 100644 --- a/arch/powerpc/platforms/85xx/p1023_rds.c +++ b/arch/powerpc/platforms/85xx/p1023_rds.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/prom.h> | 30 | #include <asm/prom.h> |
31 | #include <asm/udbg.h> | 31 | #include <asm/udbg.h> |
32 | #include <asm/mpic.h> | 32 | #include <asm/mpic.h> |
33 | #include "smp.h" | ||
33 | 34 | ||
34 | #include <sysdev/fsl_soc.h> | 35 | #include <sysdev/fsl_soc.h> |
35 | #include <sysdev/fsl_pci.h> | 36 | #include <sysdev/fsl_pci.h> |
@@ -41,10 +42,6 @@ | |||
41 | * Setup the architecture | 42 | * Setup the architecture |
42 | * | 43 | * |
43 | */ | 44 | */ |
44 | #ifdef CONFIG_SMP | ||
45 | void __init mpc85xx_smp_init(void); | ||
46 | #endif | ||
47 | |||
48 | static void __init mpc85xx_rds_setup_arch(void) | 45 | static void __init mpc85xx_rds_setup_arch(void) |
49 | { | 46 | { |
50 | struct device_node *np; | 47 | struct device_node *np; |
@@ -89,9 +86,7 @@ static void __init mpc85xx_rds_setup_arch(void) | |||
89 | fsl_add_bridge(np, 0); | 86 | fsl_add_bridge(np, 0); |
90 | #endif | 87 | #endif |
91 | 88 | ||
92 | #ifdef CONFIG_SMP | ||
93 | mpc85xx_smp_init(); | 89 | mpc85xx_smp_init(); |
94 | #endif | ||
95 | } | 90 | } |
96 | 91 | ||
97 | machine_device_initcall(p1023_rds, mpc85xx_common_publish_devices); | 92 | machine_device_initcall(p1023_rds, mpc85xx_common_publish_devices); |
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index 2df4785ffd4e..ff4249044a3c 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <sysdev/fsl_soc.h> | 28 | #include <sysdev/fsl_soc.h> |
29 | #include <sysdev/mpic.h> | 29 | #include <sysdev/mpic.h> |
30 | #include "smp.h" | ||
30 | 31 | ||
31 | extern void __early_start(void); | 32 | extern void __early_start(void); |
32 | 33 | ||
diff --git a/arch/powerpc/platforms/85xx/smp.h b/arch/powerpc/platforms/85xx/smp.h new file mode 100644 index 000000000000..e2b44933ff19 --- /dev/null +++ b/arch/powerpc/platforms/85xx/smp.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef POWERPC_85XX_SMP_H_ | ||
2 | #define POWERPC_85XX_SMP_H_ 1 | ||
3 | |||
4 | #include <linux/init.h> | ||
5 | |||
6 | #ifdef CONFIG_SMP | ||
7 | void __init mpc85xx_smp_init(void); | ||
8 | #else | ||
9 | static inline void mpc85xx_smp_init(void) | ||
10 | { | ||
11 | /* Nothing to do */ | ||
12 | } | ||
13 | #endif | ||
14 | |||
15 | #endif /* not POWERPC_85XX_SMP_H_ */ | ||
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c index 4632c1b27da7..daf9bef63de4 100644 --- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c +++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <sysdev/fsl_soc.h> | 33 | #include <sysdev/fsl_soc.h> |
34 | #include <sysdev/fsl_pci.h> | 34 | #include <sysdev/fsl_pci.h> |
35 | #include "smp.h" | ||
35 | 36 | ||
36 | #include "mpc85xx.h" | 37 | #include "mpc85xx.h" |
37 | 38 | ||
@@ -138,9 +139,6 @@ static int primary_phb_addr; | |||
138 | /* | 139 | /* |
139 | * Setup the architecture | 140 | * Setup the architecture |
140 | */ | 141 | */ |
141 | #ifdef CONFIG_SMP | ||
142 | extern void __init mpc85xx_smp_init(void); | ||
143 | #endif | ||
144 | static void __init xes_mpc85xx_setup_arch(void) | 142 | static void __init xes_mpc85xx_setup_arch(void) |
145 | { | 143 | { |
146 | #ifdef CONFIG_PCI | 144 | #ifdef CONFIG_PCI |
@@ -174,9 +172,7 @@ static void __init xes_mpc85xx_setup_arch(void) | |||
174 | } | 172 | } |
175 | #endif | 173 | #endif |
176 | 174 | ||
177 | #ifdef CONFIG_SMP | ||
178 | mpc85xx_smp_init(); | 175 | mpc85xx_smp_init(); |
179 | #endif | ||
180 | } | 176 | } |
181 | 177 | ||
182 | machine_device_initcall(xes_mpc8572, mpc85xx_common_publish_devices); | 178 | machine_device_initcall(xes_mpc8572, mpc85xx_common_publish_devices); |