From owner-svn-src-head@FreeBSD.ORG Sat May 30 15:20:26 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5299F106570A; Sat, 30 May 2009 15:20:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40F148FC17; Sat, 30 May 2009 15:20:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4UFKQJd011584; Sat, 30 May 2009 15:20:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4UFKQZY011583; Sat, 30 May 2009 15:20:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200905301520.n4UFKQZY011583@svn.freebsd.org> From: Adrian Chadd Date: Sat, 30 May 2009 15:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193098 - head/sys/i386/xen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2009 15:20:26 -0000 Author: adrian Date: Sat May 30 15:20:25 2009 New Revision: 193098 URL: http://svn.freebsd.org/changeset/base/193098 Log: 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. Modified: head/sys/i386/xen/mp_machdep.c Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Sat May 30 15:19:40 2009 (r193097) +++ head/sys/i386/xen/mp_machdep.c Sat May 30 15:20:25 2009 (r193098) @@ -973,14 +973,14 @@ smp_tlb_shootdown(u_int vector, vm_offse 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 mas 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;