aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm/tsb.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-03-06 22:59:50 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:14:20 -0500
commita77754b4d0731321db266c6c60ffcd7c62757da5 (patch)
tree37cc4c6793e2b616791d42ee840e5a007a13eccb /arch/sparc64/mm/tsb.c
parent9132983ae140a8ca81e95e081d5a4c0dd7a7f670 (diff)
[SPARC64]: Bulletproof MMU context locking.
1) Always spin_lock_init() in init_context(). The caller essentially clears it out, or copies the mm info from the parent. In both cases we need to explicitly initialize the spinlock. 2) Always do explicit IRQ disabling while taking mm->context.lock and ctx_alloc_lock. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/mm/tsb.c')
-rw-r--r--arch/sparc64/mm/tsb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c
index 534ac2819892..f36799b7152c 100644
--- a/arch/sparc64/mm/tsb.c
+++ b/arch/sparc64/mm/tsb.c
@@ -354,6 +354,7 @@ void tsb_grow(struct mm_struct *mm, unsigned long rss, gfp_t gfp_flags)
354 354
355int init_new_context(struct task_struct *tsk, struct mm_struct *mm) 355int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
356{ 356{
357 spin_lock_init(&mm->context.lock);
357 358
358 mm->context.sparc64_ctx_val = 0UL; 359 mm->context.sparc64_ctx_val = 0UL;
359 360