aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c2
-rw-r--r--arch/ppc/kernel/process.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 66073f775193..bb6a5c6a64be 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(kernel_thread);
184 184
185EXPORT_SYMBOL(flush_instruction_cache); 185EXPORT_SYMBOL(flush_instruction_cache);
186EXPORT_SYMBOL(giveup_fpu); 186EXPORT_SYMBOL(giveup_fpu);
187EXPORT_SYMBOL(flush_icache_range); 187EXPORT_SYMBOL(__flush_icache_range);
188EXPORT_SYMBOL(flush_dcache_range); 188EXPORT_SYMBOL(flush_dcache_range);
189EXPORT_SYMBOL(flush_icache_user_range); 189EXPORT_SYMBOL(flush_icache_user_range);
190EXPORT_SYMBOL(flush_dcache_page); 190EXPORT_SYMBOL(flush_dcache_page);
diff --git a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c
index cb1c7b92f8c6..25cbdc8d2941 100644
--- a/arch/ppc/kernel/process.c
+++ b/arch/ppc/kernel/process.c
@@ -417,6 +417,7 @@ void show_regs(struct pt_regs * regs)
417 417
418void exit_thread(void) 418void exit_thread(void)
419{ 419{
420 preempt_disable();
420 if (last_task_used_math == current) 421 if (last_task_used_math == current)
421 last_task_used_math = NULL; 422 last_task_used_math = NULL;
422 if (last_task_used_altivec == current) 423 if (last_task_used_altivec == current)
@@ -425,10 +426,12 @@ void exit_thread(void)
425 if (last_task_used_spe == current) 426 if (last_task_used_spe == current)
426 last_task_used_spe = NULL; 427 last_task_used_spe = NULL;
427#endif 428#endif
429 preempt_enable();
428} 430}
429 431
430void flush_thread(void) 432void flush_thread(void)
431{ 433{
434 preempt_disable();
432 if (last_task_used_math == current) 435 if (last_task_used_math == current)
433 last_task_used_math = NULL; 436 last_task_used_math = NULL;
434 if (last_task_used_altivec == current) 437 if (last_task_used_altivec == current)
@@ -437,6 +440,7 @@ void flush_thread(void)
437 if (last_task_used_spe == current) 440 if (last_task_used_spe == current)
438 last_task_used_spe = NULL; 441 last_task_used_spe = NULL;
439#endif 442#endif
443 preempt_enable();
440} 444}
441 445
442void 446void
@@ -535,6 +539,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp)
535 regs->nip = nip; 539 regs->nip = nip;
536 regs->gpr[1] = sp; 540 regs->gpr[1] = sp;
537 regs->msr = MSR_USER; 541 regs->msr = MSR_USER;
542 preempt_disable();
538 if (last_task_used_math == current) 543 if (last_task_used_math == current)
539 last_task_used_math = NULL; 544 last_task_used_math = NULL;
540 if (last_task_used_altivec == current) 545 if (last_task_used_altivec == current)
@@ -543,6 +548,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp)
543 if (last_task_used_spe == current) 548 if (last_task_used_spe == current)
544 last_task_used_spe = NULL; 549 last_task_used_spe = NULL;
545#endif 550#endif
551 preempt_enable();
546 memset(current->thread.fpr, 0, sizeof(current->thread.fpr)); 552 memset(current->thread.fpr, 0, sizeof(current->thread.fpr));
547 current->thread.fpscr.val = 0; 553 current->thread.fpscr.val = 0;
548#ifdef CONFIG_ALTIVEC 554#ifdef CONFIG_ALTIVEC