From: Peter Zijlstra <peterz@infradead.org>
To: Michal Simek <monstr@monstr.eu>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
mingo@kernel.org, Ralf Baechle <ralf@linux-mips.org>,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: [PATCH] microblaze: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW usage
Date: Wed, 24 Aug 2011 15:32:31 +0200 [thread overview]
Message-ID: <1314192751.6925.9.camel@twins> (raw)
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*/
reply other threads:[~2011-08-24 13:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314192751.6925.9.camel@twins \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=monstr@monstr.eu \
--cc=ralf@linux-mips.org \
--cc=rmk+kernel@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®