patch-2.4.22 linux-2.4.22/arch/ia64/mm/tlb.c
Next file: linux-2.4.22/arch/ia64/scripts/unwcheck.sh
Previous file: linux-2.4.22/arch/ia64/mm/init.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
2003-08-25 04:44:39.000000000 -0700
- Orig file:
linux-2.4.21/arch/ia64/mm/tlb.c
- Orig date:
2003-06-13 07:51:29.000000000 -0700
diff -urN linux-2.4.21/arch/ia64/mm/tlb.c linux-2.4.22/arch/ia64/mm/tlb.c
@@ -34,10 +34,10 @@
1 << _PAGE_SIZE_4K )
struct ia64_ctx ia64_ctx = {
- lock: SPIN_LOCK_UNLOCKED,
- next: 1,
- limit: (1 << 15) - 1, /* start out with the safe (architected) limit */
- max_ctx: ~0U
+ .lock = SPIN_LOCK_UNLOCKED,
+ .next = 1,
+ .limit =(1 << 15) - 1, /* start out with the safe (architected) limit */
+ .max_ctx = ~0U
};
/*
@@ -48,6 +48,7 @@
{
unsigned long tsk_context, max_ctx = ia64_ctx.max_ctx;
struct task_struct *tsk;
+ int i;
if (ia64_ctx.next > max_ctx)
ia64_ctx.next = 300; /* skip daemons */
@@ -76,7 +77,14 @@
ia64_ctx.limit = tsk_context;
}
read_unlock(&tasklist_lock);
- flush_tlb_all();
+ /*
+ * Can't call flush_tlb_all() here because of race condition with scheduler [EF]
+ * and because interrupts are disabled during context switch.
+ */
+ for (i = 0; i < NR_CPUS; ++i)
+ if (i != smp_processor_id())
+ cpu_data(i)->need_tlb_flush = 1;
+ local_flush_tlb_all();
}
void
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)