lkml.org 
[lkml]   [2010]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ARM: Fix spinlock bad magic on disabling nonboot cpu
Date
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.

Signed-off-by: Colin Cross <ccross@android.com>
---
arch/arm/include/asm/mmu.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index 68870c7..1556f6a 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -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


\
 
 \ /
  Last update: 2010-11-20 03:19    [W:0.035 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site