aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2011-08-24 09:32:31 -0400
committerMichal Simek <monstr@monstr.eu>2011-10-14 06:28:42 -0400
commit84ac218f0257a0cfd7689d9a44f53118dbf307b3 (patch)
tree015d3fc9489fbb00da12dbf4eee72752f3307b9e
parentcb5edfe3e553d930f9a13cb75cfe395ee38cde23 (diff)
microblaze: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW usage
As far as I can tell the only reason microblaze has __ARCH_WANT_INTERRUPTS_ON_CTXSW is because it initializes new task state with interrupts enabled so that on switch_to() interrupts get enabled. So change copy_thread() to clear MSR_IE instead of set it, this will ensure switch_to() will always keep IRQs disabled. The scheduler will disable IRQs when taking rq->lock in schedule() and enable IRQs in finish_lock_switch() after its done its magic. This leaves ARM the only __ARCH_WANT_INTERRUPTS_ON_CTXSW user. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Michal Simek <monstr@monstr.eu>
-rw-r--r--arch/microblaze/include/asm/system.h2
-rw-r--r--arch/microblaze/kernel/process.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h
index 0953d1425d5b..5a433cbaafb3 100644
--- a/arch/microblaze/include/asm/system.h
+++ b/arch/microblaze/include/asm/system.h
@@ -17,8 +17,6 @@
17#include <asm-generic/cmpxchg.h> 17#include <asm-generic/cmpxchg.h>
18#include <asm-generic/cmpxchg-local.h> 18#include <asm-generic/cmpxchg-local.h>
19 19
20#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
21
22struct task_struct; 20struct task_struct;
23struct thread_info; 21struct thread_info;
24 22
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index dbb812421d8a..95cc295976a7 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -179,6 +179,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
179 179
180 ti->cpu_context.msr = (childregs->msr|MSR_VM); 180 ti->cpu_context.msr = (childregs->msr|MSR_VM);
181 ti->cpu_context.msr &= ~MSR_UMS; /* switch_to to kernel mode */ 181 ti->cpu_context.msr &= ~MSR_UMS; /* switch_to to kernel mode */
182 ti->cpu_context.msr &= ~MSR_IE;
182#endif 183#endif
183 ti->cpu_context.r15 = (unsigned long)ret_from_fork - 8; 184 ti->cpu_context.r15 = (unsigned long)ret_from_fork - 8;
184 185