diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/smp.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/smp.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index a509c5292a67..fbffd7e47ab8 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -44,10 +44,11 @@ | |||
44 | #include <asm/mpic.h> | 44 | #include <asm/mpic.h> |
45 | #include <asm/vdso_datapage.h> | 45 | #include <asm/vdso_datapage.h> |
46 | #include <asm/cputhreads.h> | 46 | #include <asm/cputhreads.h> |
47 | #include <asm/mpic.h> | ||
48 | #include <asm/xics.h> | ||
47 | 49 | ||
48 | #include "plpar_wrappers.h" | 50 | #include "plpar_wrappers.h" |
49 | #include "pseries.h" | 51 | #include "pseries.h" |
50 | #include "xics.h" | ||
51 | #include "offline_states.h" | 52 | #include "offline_states.h" |
52 | 53 | ||
53 | 54 | ||
@@ -136,7 +137,6 @@ out: | |||
136 | return 1; | 137 | return 1; |
137 | } | 138 | } |
138 | 139 | ||
139 | #ifdef CONFIG_XICS | ||
140 | static void __devinit smp_xics_setup_cpu(int cpu) | 140 | static void __devinit smp_xics_setup_cpu(int cpu) |
141 | { | 141 | { |
142 | if (cpu != boot_cpuid) | 142 | if (cpu != boot_cpuid) |
@@ -151,14 +151,13 @@ static void __devinit smp_xics_setup_cpu(int cpu) | |||
151 | set_default_offline_state(cpu); | 151 | set_default_offline_state(cpu); |
152 | #endif | 152 | #endif |
153 | } | 153 | } |
154 | #endif /* CONFIG_XICS */ | ||
155 | 154 | ||
156 | static void __devinit smp_pSeries_kick_cpu(int nr) | 155 | static int __devinit smp_pSeries_kick_cpu(int nr) |
157 | { | 156 | { |
158 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 157 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
159 | 158 | ||
160 | if (!smp_startup_cpu(nr)) | 159 | if (!smp_startup_cpu(nr)) |
161 | return; | 160 | return -ENOENT; |
162 | 161 | ||
163 | /* | 162 | /* |
164 | * The processor is currently spinning, waiting for the | 163 | * The processor is currently spinning, waiting for the |
@@ -180,6 +179,8 @@ static void __devinit smp_pSeries_kick_cpu(int nr) | |||
180 | "Ret= %ld\n", nr, rc); | 179 | "Ret= %ld\n", nr, rc); |
181 | } | 180 | } |
182 | #endif | 181 | #endif |
182 | |||
183 | return 0; | ||
183 | } | 184 | } |
184 | 185 | ||
185 | static int smp_pSeries_cpu_bootable(unsigned int nr) | 186 | static int smp_pSeries_cpu_bootable(unsigned int nr) |
@@ -197,23 +198,22 @@ static int smp_pSeries_cpu_bootable(unsigned int nr) | |||
197 | 198 | ||
198 | return 1; | 199 | return 1; |
199 | } | 200 | } |
200 | #ifdef CONFIG_MPIC | 201 | |
201 | static struct smp_ops_t pSeries_mpic_smp_ops = { | 202 | static struct smp_ops_t pSeries_mpic_smp_ops = { |
202 | .message_pass = smp_mpic_message_pass, | 203 | .message_pass = smp_mpic_message_pass, |
203 | .probe = smp_mpic_probe, | 204 | .probe = smp_mpic_probe, |
204 | .kick_cpu = smp_pSeries_kick_cpu, | 205 | .kick_cpu = smp_pSeries_kick_cpu, |
205 | .setup_cpu = smp_mpic_setup_cpu, | 206 | .setup_cpu = smp_mpic_setup_cpu, |
206 | }; | 207 | }; |
207 | #endif | 208 | |
208 | #ifdef CONFIG_XICS | ||
209 | static struct smp_ops_t pSeries_xics_smp_ops = { | 209 | static struct smp_ops_t pSeries_xics_smp_ops = { |
210 | .message_pass = smp_xics_message_pass, | 210 | .message_pass = smp_muxed_ipi_message_pass, |
211 | .probe = smp_xics_probe, | 211 | .cause_ipi = NULL, /* Filled at runtime by xics_smp_probe() */ |
212 | .probe = xics_smp_probe, | ||
212 | .kick_cpu = smp_pSeries_kick_cpu, | 213 | .kick_cpu = smp_pSeries_kick_cpu, |
213 | .setup_cpu = smp_xics_setup_cpu, | 214 | .setup_cpu = smp_xics_setup_cpu, |
214 | .cpu_bootable = smp_pSeries_cpu_bootable, | 215 | .cpu_bootable = smp_pSeries_cpu_bootable, |
215 | }; | 216 | }; |
216 | #endif | ||
217 | 217 | ||
218 | /* This is called very early */ | 218 | /* This is called very early */ |
219 | static void __init smp_init_pseries(void) | 219 | static void __init smp_init_pseries(void) |
@@ -245,14 +245,12 @@ static void __init smp_init_pseries(void) | |||
245 | pr_debug(" <- smp_init_pSeries()\n"); | 245 | pr_debug(" <- smp_init_pSeries()\n"); |
246 | } | 246 | } |
247 | 247 | ||
248 | #ifdef CONFIG_MPIC | ||
249 | void __init smp_init_pseries_mpic(void) | 248 | void __init smp_init_pseries_mpic(void) |
250 | { | 249 | { |
251 | smp_ops = &pSeries_mpic_smp_ops; | 250 | smp_ops = &pSeries_mpic_smp_ops; |
252 | 251 | ||
253 | smp_init_pseries(); | 252 | smp_init_pseries(); |
254 | } | 253 | } |
255 | #endif | ||
256 | 254 | ||
257 | void __init smp_init_pseries_xics(void) | 255 | void __init smp_init_pseries_xics(void) |
258 | { | 256 | { |