diff options
author | Michael Neuling <mikey@neuling.org> | 2013-10-02 03:15:14 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-31 01:19:17 -0400 |
commit | 7ba5fef7d9e1880635cbb2fd698e8a24dc366d0f (patch) | |
tree | 597d9ff718a5be854367e0598dc591fe486d003d /arch/powerpc/kernel/process.c | |
parent | d0cebfa650a084f041131207d81f9b311babd5ef (diff) |
powerpc/tm: Remove interrupt disable in __switch_to()
We currently turn IRQs off in __switch_to(0 but this is unnecessary as it's
already disabled in the caller.
This removes the IRQ disable but adds a check to make sure it is really off
in case this changes in future.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 4d42c4de8b9b..75c2d1009985 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -597,12 +597,13 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
597 | struct task_struct *new) | 597 | struct task_struct *new) |
598 | { | 598 | { |
599 | struct thread_struct *new_thread, *old_thread; | 599 | struct thread_struct *new_thread, *old_thread; |
600 | unsigned long flags; | ||
601 | struct task_struct *last; | 600 | struct task_struct *last; |
602 | #ifdef CONFIG_PPC_BOOK3S_64 | 601 | #ifdef CONFIG_PPC_BOOK3S_64 |
603 | struct ppc64_tlb_batch *batch; | 602 | struct ppc64_tlb_batch *batch; |
604 | #endif | 603 | #endif |
605 | 604 | ||
605 | WARN_ON(!irqs_disabled()); | ||
606 | |||
606 | /* Back up the TAR across context switches. | 607 | /* Back up the TAR across context switches. |
607 | * Note that the TAR is not available for use in the kernel. (To | 608 | * Note that the TAR is not available for use in the kernel. (To |
608 | * provide this, the TAR should be backed up/restored on exception | 609 | * provide this, the TAR should be backed up/restored on exception |
@@ -722,8 +723,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
722 | } | 723 | } |
723 | #endif /* CONFIG_PPC_BOOK3S_64 */ | 724 | #endif /* CONFIG_PPC_BOOK3S_64 */ |
724 | 725 | ||
725 | local_irq_save(flags); | ||
726 | |||
727 | /* | 726 | /* |
728 | * We can't take a PMU exception inside _switch() since there is a | 727 | * We can't take a PMU exception inside _switch() since there is a |
729 | * window where the kernel stack SLB and the kernel stack are out | 728 | * window where the kernel stack SLB and the kernel stack are out |
@@ -743,8 +742,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
743 | } | 742 | } |
744 | #endif /* CONFIG_PPC_BOOK3S_64 */ | 743 | #endif /* CONFIG_PPC_BOOK3S_64 */ |
745 | 744 | ||
746 | local_irq_restore(flags); | ||
747 | |||
748 | return last; | 745 | return last; |
749 | } | 746 | } |
750 | 747 | ||