]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/powerpc/kernel/process.c
powerpc/tm: Remove interrupt disable in __switch_to()
[linux-beck.git] / arch / powerpc / kernel / process.c
index 4d42c4de8b9b26305d437c5aa3c601b80812cfc5..75c2d1009985eb8dbd9f3995fc900f9f21227d01 100644 (file)
@@ -597,12 +597,13 @@ struct task_struct *__switch_to(struct task_struct *prev,
        struct task_struct *new)
 {
        struct thread_struct *new_thread, *old_thread;
-       unsigned long flags;
        struct task_struct *last;
 #ifdef CONFIG_PPC_BOOK3S_64
        struct ppc64_tlb_batch *batch;
 #endif
 
+       WARN_ON(!irqs_disabled());
+
        /* Back up the TAR across context switches.
         * Note that the TAR is not available for use in the kernel.  (To
         * provide this, the TAR should be backed up/restored on exception
@@ -722,8 +723,6 @@ struct task_struct *__switch_to(struct task_struct *prev,
        }
 #endif /* CONFIG_PPC_BOOK3S_64 */
 
-       local_irq_save(flags);
-
        /*
         * We can't take a PMU exception inside _switch() since there is a
         * 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,
        }
 #endif /* CONFIG_PPC_BOOK3S_64 */
 
-       local_irq_restore(flags);
-
        return last;
 }