summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@gmail.com>2010-11-23 11:39:23 +0100
committerColin Cross <ccross@android.com>2011-01-07 14:19:01 -0800
commitc64395938a1345da3eb9a42b779f4e96b66c0202 (patch)
treed514cdc27249c813d7f32c8a3a80710d2c9b7906 /arch
parent35a0841bb89837e1d3551acb4b0c5510b778d1be (diff)
ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context
init_mm used at kernel/sched.c:idle_task_exit() has spin_lock (init_mm.context.id_lock) that is not initialized when spin_lock/unlock is called at an ARM machine. Note that mm_struct.context.id_lock is usually initialized except for the instance of init_mm at linux/arch/arm/mm/context.c Not initializing this spinlock incurs "BUG: pinlock bad magic" warning when spinlock debug is enabled. We have observed such instances when testing PM in S5PC210 machines. Change-Id: I52c6c6d035c220822a5675faaf8d163a3535985d Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/mmu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index 68870c776671..b4ffe9d5b526 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -13,6 +13,10 @@ typedef struct {
#ifdef CONFIG_CPU_HAS_ASID
#define ASID(mm) ((mm)->context.id & 255)
+
+/* init_mm.context.id_lock should be initialized. */
+#define INIT_MM_CONTEXT(name) \
+ .context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock),
#else
#define ASID(mm) (0)
#endif