[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1314192751.6925.9.camel@twins>
Date: Wed, 24 Aug 2011 15:32:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Michal Simek <monstr@...str.eu>
Cc: linux-kernel <linux-kernel@...r.kernel.org>, mingo@...nel.org,
Ralf Baechle <ralf@...ux-mips.org>,
Russell King <rmk+kernel@....linux.org.uk>
Subject: [PATCH] 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@...llo.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*/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists