patch-2.4.25 linux-2.4.25/include/asm-ia64/mmu_context.h
Next file: linux-2.4.25/include/asm-ia64/page.h
Previous file: linux-2.4.25/include/asm-ia64/mca_asm.h
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
2004-02-18 05:36:32.000000000 -0800
- Orig file:
linux-2.4.24/include/asm-ia64/mmu_context.h
- Orig date:
2003-08-25 04:44:43.000000000 -0700
diff -urN linux-2.4.24/include/asm-ia64/mmu_context.h linux-2.4.25/include/asm-ia64/mmu_context.h
@@ -62,12 +62,13 @@
static inline mm_context_t
get_mmu_context (struct mm_struct *mm)
{
+ unsigned long flags;
mm_context_t context = mm->context;
if (context)
return context;
- spin_lock(&ia64_ctx.lock);
+ spin_lock_irqsave(&ia64_ctx.lock, flags);
{
/* re-check, now that we've got the lock: */
context = mm->context;
@@ -77,7 +78,7 @@
mm->context = context = ia64_ctx.next++;
}
}
- spin_unlock(&ia64_ctx.lock);
+ spin_unlock_irqrestore(&ia64_ctx.lock, flags);
return context;
}
@@ -114,6 +115,10 @@
rr2 = rr0 + 2*rid_incr;
rr3 = rr0 + 3*rid_incr;
rr4 = rr0 + 4*rid_incr;
+#ifdef CONFIG_HUGETLB_PAGE
+ rr4 = (rr4 & (~(0xfcUL))) | (HPAGE_SHIFT << 2);
+#endif
+
ia64_set_rr(0x0000000000000000, rr0);
ia64_set_rr(0x2000000000000000, rr1);
ia64_set_rr(0x4000000000000000, rr2);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)