mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] microblaze: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW usage
@ 2011-08-24 13:32 Peter Zijlstra
  0 siblings, 0 replies; only message in thread
From: Peter Zijlstra @ 2011-08-24 13:32 UTC (permalink / raw)
  To: Michal Simek; +Cc: linux-kernel, mingo, Ralf Baechle, Russell King

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>
---
 arch/microblaze/include/asm/system.h |    2 --
 arch/microblaze/kernel/process.c     |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h
index e6a2284..ec4f3d0 100644
--- a/arch/microblaze/include/asm/system.h
+++ b/arch/microblaze/include/asm/system.h
@@ -17,8 +17,6 @@
 #include <asm-generic/cmpxchg.h>
 #include <asm-generic/cmpxchg-local.h>
 
-#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
-
 struct task_struct;
 struct thread_info;
 
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index dbb8124..c72d044 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -172,7 +172,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
 	 * right now MSR is a copy of parent one */
 	childregs->msr |= MSR_BIP;
 	childregs->msr &= ~MSR_EIP;
-	childregs->msr |= MSR_IE;
+	childregs->msr &= ~MSR_IE;
 	childregs->msr &= ~MSR_VM;
 	childregs->msr |= MSR_VMS;
 	childregs->msr |= MSR_EE; /* exceptions will be enabled*/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-24 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24 13:32 [PATCH] microblaze: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW usage Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®