From eee45687e99d1f169f1d17d9ddb5707fd666e219 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sat, 30 May 2009 15:20:25 +0000 Subject: [PATCH] Even though I'm not quite sure that the call_func stuff will work properly in all the places/cases IPI messages will be generated, at least be consistent with how the call_data pointer is assigned and cleared (ie, all done inside the spinlock. Ensure that its NULL before continuing, just to try and identify situations where things are going horribly wrong. --- sys/i386/xen/mp_machdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/i386/xen/mp_machdep.c b/sys/i386/xen/mp_machdep.c index ef1ef12e83a3..d4a34ad1fa7f 100644 --- a/sys/i386/xen/mp_machdep.c +++ b/sys/i386/xen/mp_machdep.c @@ -973,14 +973,14 @@ smp_tlb_shootdown(u_int vector, vm_offset_t addr1, vm_offset_t addr2) u_int ncpu; struct _call_data data; - call_data = &data; - ncpu = mp_ncpus - 1; /* does not shootdown self */ if (ncpu < 1) return; /* no other cpus */ if (!(read_eflags() & PSL_I)) panic("%s: interrupts disabled", __func__); mtx_lock_spin(&smp_ipi_mtx); + KASSERT(call_data == NULL, ("call_data isn't null?!")); + call_data = &data; call_data->func_id = vector; call_data->arg1 = addr1; call_data->arg2 = addr2; @@ -1021,6 +1021,7 @@ smp_targeted_tlb_shootdown(cpumask_t mask, u_int vector, vm_offset_t addr1, vm_o if (!(read_eflags() & PSL_I)) panic("%s: interrupts disabled", __func__); mtx_lock_spin(&smp_ipi_mtx); + KASSERT(call_data == NULL, ("call_data isn't null?!")); call_data = &data; call_data->func_id = vector; call_data->arg1 = addr1;