Skip to content

Commit

Permalink
microblaze: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Michal Simek committed Oct 14, 2011
1 parent cb5edfe commit 84ac218
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions arch/microblaze/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions arch/microblaze/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,

ti->cpu_context.msr = (childregs->msr|MSR_VM);
ti->cpu_context.msr &= ~MSR_UMS; /* switch_to to kernel mode */
ti->cpu_context.msr &= ~MSR_IE;
#endif
ti->cpu_context.r15 = (unsigned long)ret_from_fork - 8;

Expand Down

0 comments on commit 84ac218

Please sign in to comment.