Commit 28c22d7d authored by MyungJoo Ham's avatar MyungJoo Ham Committed by Russell King
Browse files

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

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.
Signed-off-by: default avatarMyungJoo Ham <>
Signed-off-by: default avatarKyungmin Park <>
Signed-off-by: default avatarRussell King <>
parent 932c42b2
......@@ -13,6 +13,10 @@ typedef struct {
#define ASID(mm) ((mm)-> & 255)
/* init_mm.context.id_lock should be initialized. */
#define INIT_MM_CONTEXT(name) \
.context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock),
#define ASID(mm) (0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment