summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2009-12-10 12:07:02 +0100
committerMichal Simek <monstr@monstr.eu>2009-12-14 08:40:09 +0100
commitbf2d809668907c69b554459764b36584e4d57e4a (patch)
tree8f3e16925a34645ffd14e6d171937b37a06fba41 /arch/microblaze/include/asm
parent519e9f417388ba055b7604db5f4f492f7c84f427 (diff)
downloadblackbird-op-linux-bf2d809668907c69b554459764b36584e4d57e4a.tar.gz
blackbird-op-linux-bf2d809668907c69b554459764b36584e4d57e4a.zip
microblaze: Lockdep support
Microblaze needs to do lock_init very soon because MMU init calls lock functions. Here is the explanation from Peter Zijlstra why we have to enable __ARCH_WANTS_INTERRUPTS_ON_CTSW. "So we schedule while holding rq->lock (for obvious reasons), but since lockdep tracks held locks per tasks, we need to transfer the held state from the prev to the next task. We do this by explicity calling spin_release(&rq->lock) in context_switch() right before switch_to(), and calling spin_acquire(&rq->lock) in finish_task_switch()->finish_lock_switch(). Now, for some reason lockdep thinks that interrupts got enabled over the context switch (git grep __ARCH_WANTS_INTERRUPTS_ON_CTSW arch/microblaze doesn't seem to turn up anything). Clearly trying to acquire the rq->lock with interrupts enabled is a bad idea and lockdep warns you about this." Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/include/asm')
-rw-r--r--arch/microblaze/include/asm/system.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/microblaze/include/asm/system.h b/arch/microblaze/include/asm/system.h
index b1ed61590660..157970688b2a 100644
--- a/arch/microblaze/include/asm/system.h
+++ b/arch/microblaze/include/asm/system.h
@@ -16,6 +16,8 @@
#include <asm-generic/cmpxchg.h>
#include <asm-generic/cmpxchg-local.h>
+#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
+
struct task_struct;
struct thread_info;
OpenPOWER on IntegriCloud