diff options
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 1f816f0d7740..57703994a063 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -201,13 +201,13 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs) | |||
201 | } | 201 | } |
202 | #endif /* CONFIG_SPE */ | 202 | #endif /* CONFIG_SPE */ |
203 | 203 | ||
204 | #ifndef CONFIG_SMP | ||
204 | /* | 205 | /* |
205 | * If we are doing lazy switching of CPU state (FP, altivec or SPE), | 206 | * If we are doing lazy switching of CPU state (FP, altivec or SPE), |
206 | * and the current task has some state, discard it. | 207 | * and the current task has some state, discard it. |
207 | */ | 208 | */ |
208 | static inline void discard_lazy_cpu_state(void) | 209 | void discard_lazy_cpu_state(void) |
209 | { | 210 | { |
210 | #ifndef CONFIG_SMP | ||
211 | preempt_disable(); | 211 | preempt_disable(); |
212 | if (last_task_used_math == current) | 212 | if (last_task_used_math == current) |
213 | last_task_used_math = NULL; | 213 | last_task_used_math = NULL; |
@@ -220,9 +220,10 @@ static inline void discard_lazy_cpu_state(void) | |||
220 | last_task_used_spe = NULL; | 220 | last_task_used_spe = NULL; |
221 | #endif | 221 | #endif |
222 | preempt_enable(); | 222 | preempt_enable(); |
223 | #endif /* CONFIG_SMP */ | ||
224 | } | 223 | } |
224 | #endif /* CONFIG_SMP */ | ||
225 | 225 | ||
226 | #ifdef CONFIG_PPC_MERGE /* XXX for now */ | ||
226 | int set_dabr(unsigned long dabr) | 227 | int set_dabr(unsigned long dabr) |
227 | { | 228 | { |
228 | if (ppc_md.set_dabr) | 229 | if (ppc_md.set_dabr) |
@@ -231,6 +232,7 @@ int set_dabr(unsigned long dabr) | |||
231 | mtspr(SPRN_DABR, dabr); | 232 | mtspr(SPRN_DABR, dabr); |
232 | return 0; | 233 | return 0; |
233 | } | 234 | } |
235 | #endif | ||
234 | 236 | ||
235 | #ifdef CONFIG_PPC64 | 237 | #ifdef CONFIG_PPC64 |
236 | DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); | 238 | DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); |