From owner-svn-src-projects@FreeBSD.ORG Wed Sep 1 09:47:56 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 981A11065695; Wed, 1 Sep 2010 09:47:56 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C9798FC0A; Wed, 1 Sep 2010 09:47:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o819lu7g057844; Wed, 1 Sep 2010 09:47:56 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o819lu9N057842; Wed, 1 Sep 2010 09:47:56 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201009010947.o819lu9N057842@svn.freebsd.org> From: Attilio Rao Date: Wed, 1 Sep 2010 09:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212085 - projects/sv/sys/net X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 09:47:56 -0000 Author: attilio Date: Wed Sep 1 09:47:56 2010 New Revision: 212085 URL: http://svn.freebsd.org/changeset/base/212085 Log: We don't need to stop the CPUs: - If we entered the debugger via a panic breakpoint() already did that - If we are running a reboot(2) instance with RB_DUMP it is not due Modified: projects/sv/sys/net/netdump_client.c Modified: projects/sv/sys/net/netdump_client.c ============================================================================== --- projects/sv/sys/net/netdump_client.c Wed Sep 1 08:32:40 2010 (r212084) +++ projects/sv/sys/net/netdump_client.c Wed Sep 1 09:47:56 2010 (r212085) @@ -1157,10 +1157,7 @@ netdump_trigger(void *arg, int howto) uint8_t broken_state[NETDUMP_BROKEN_STATE_BUFFER_SIZE]; void (*old_if_input)(struct ifnet *, struct mbuf *)=NULL; int error; -#ifdef SMP - u_int cpumap=0; -#endif - + if ((howto&(RB_HALT|RB_DUMP))!=RB_DUMP || !nd_enable || cold || dumping) return; @@ -1190,34 +1187,6 @@ netdump_trigger(void *arg, int howto) /***** Beyond this point, don't return: goto abort *****/ - /* Stop all the other CPUs */ -#ifdef SMP - if (smp_active != 0) { - printf("netdump_trigger called on cpu#%d\n", PCPU_GET(cpuid)); - - cpumap = PCPU_GET(other_cpus) & ~ stopped_cpus; - if (cpumap != 0) { - unsigned long long end_ts; - - printf("netdump_trigger: Stopping other CPUs\n"); - - /* 1 second */ - end_ts = rdtsc() + 1ULL * tsc_freq; - - ipi_selected(cpumap, IPI_STOP); - - while ((atomic_load_acq_int(&stopped_cpus) & cpumap) - != cpumap) { - if (rdtsc() > end_ts) { - printf("netdump_trigger: Stopping other" - "CPUs timed out. Continuing " - "anyway.\n"); - break; - } - } - } - } -#endif bzero(broken_state, sizeof(broken_state)); error = nd_nic->if_netdump->break_lock(nd_nic, &broke_lock, broken_state, sizeof(broken_state)); @@ -1290,11 +1259,6 @@ cleanup: /* Even if we broke the lock, this seems like the most sane thing to * do */ nd_nic->if_netdump->release_lock(nd_nic); -#ifdef SMP - if (cpumap) { - restart_cpus(cpumap); - } -#endif dumping--; }