Skip to contentSkip to conversation

ARM: Fix spinlock bad magic on disabling nonboot cpu

PATCH In review Colin Cross 3 participants 3 messages Nov 20, 2010 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Fix spinlock bad magic on disabling nonboot cpu

The init_mm.context.id_lock spinlock is not initialized, which causes a spinlock bad magic warning when nonboot cpus are disabled, either through hotplug or during suspend.

---
 arch/arm/include/asm/mmu.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/include/asm/mmu.h +2 -0
index 68870c7..1556f6a 100644
@@ -13,6 +13,8 @@ typedef struct {
 
 #ifdef CONFIG_CPU_HAS_ASID
 #define ASID(mm)	((mm)->context.id & 255)
+#define INIT_MM_CONTEXT(name)                                                 \
+        .context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock),
 #else
 #define ASID(mm)	(0)
 #endif
Signature · 1 line
1.7.3.1
#1 lore raw

Hi,

I wonder why this patch is not merged previous rc cycles.

it's already reported by Mr. Ham (a month or more ago) and get some acked for merge.

To Rusell, Catalin,
How to include or commit the latest kernel?

Thank you,
Kyungmin Park

Quoted 31 lines · Colin Cross

The init_mm.context.id_lock spinlock is not initialized, which causes a spinlock bad magic warning when nonboot cpus are disabled, either through hotplug or during suspend.

---
?arch/arm/include/asm/mmu.h | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)

arch/arm/include/asm/mmu.h +0 -0
index 68870c7..1556f6a 100644
@@ -13,6 +13,8 @@ typedef struct {
 

?#ifdef CONFIG_CPU_HAS_ASID
?#define ASID(mm) ? ? ? ((mm)->context.id & 255)
+#define INIT_MM_CONTEXT(name) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
+ ? ? ? ?.context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock), ?#else
?#define ASID(mm) ? ? ? (0)
?#endif
--
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html Please read the FAQ at ?http://www.tux.org/lkml/

#2 lore raw
Quoted 9 lines · Kyungmin Park

Hi,b

I wonder why this patch is not merged previous rc cycles.

it's already reported by Mr. Ham (a month or more ago) and get some acked for merge.

To Rusell, Catalin,
How to include or commit the latest kernel?

Just send the patch to Russell's patch system and Russell will pick it up. I recall I already acked this patch.

Signature · 1 line
Catalin