From owner-p4-projects Mon Nov 11 13: 5: 2 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 80F1837B404; Mon, 11 Nov 2002 13:04:57 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3F8537B401 for ; Mon, 11 Nov 2002 13:04:56 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09E2943E8A for ; Mon, 11 Nov 2002 13:04:55 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gABL2amV093731 for ; Mon, 11 Nov 2002 13:02:36 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gABL2ajg093726 for perforce@freebsd.org; Mon, 11 Nov 2002 13:02:36 -0800 (PST) Date: Mon, 11 Nov 2002 13:02:36 -0800 (PST) Message-Id: <200211112102.gABL2ajg093726@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 20975 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=20975 Change 20975 by jhb@jhb_laptop on 2002/11/11 13:02:15 Change callers of witness_list() to use WITNESS_WARN() instead. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/trap.c#40 edit .. //depot/projects/smpng/sys/i386/i386/trap.c#46 edit .. //depot/projects/smpng/sys/ia64/ia64/trap.c#39 edit .. //depot/projects/smpng/sys/kern/subr_mbuf.c#21 edit .. //depot/projects/smpng/sys/kern/subr_trap.c#42 edit .. //depot/projects/smpng/sys/powerpc/powerpc/trap.c#27 edit .. //depot/projects/smpng/sys/sparc64/sparc64/trap.c#43 edit Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/trap.c#40 (text+ko) ==== @@ -789,12 +789,8 @@ #ifdef INVARIANTS cred_free_thread(td); #endif -#ifdef WITNESS - if (witness_list(td)) { - panic("system call %s returning with mutex(s) held\n", - syscallnames[code]); - } -#endif + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + syscallnames[code]); mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); } ==== //depot/projects/smpng/sys/i386/i386/trap.c#46 (text+ko) ==== @@ -1099,13 +1099,8 @@ #ifdef INVARIANTS cred_free_thread(td); #endif - -#ifdef WITNESS - if (witness_list(td)) { - panic("system call %s returning with mutex(s) held\n", - syscallnames[code]); - } -#endif + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + syscallnames[code]); mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); } ==== //depot/projects/smpng/sys/ia64/ia64/trap.c#39 (text+ko) ==== @@ -905,12 +905,8 @@ #ifdef INVARIANTS cred_free_thread(td); #endif -#ifdef WITNESS - if (witness_list(td)) { - panic("system call %s returning with mutex(s) held\n", - syscallnames[code]); - } -#endif + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + syscallnames[code]); mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); } @@ -1082,13 +1078,8 @@ #ifdef INVARIANTS cred_free_thread(td); #endif - -#ifdef WITNESS - if (witness_list(td)) { - panic("system call %s returning with mutex(s) held\n", - syscallnames[code]); - } -#endif + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + syscallnames[code]); mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); } ==== //depot/projects/smpng/sys/kern/subr_mbuf.c#21 (text+ko) ==== @@ -999,15 +999,8 @@ struct domain *dp; struct protosw *pr; -/* - * XXX: Argh, we almost always trip here with witness turned on now-a-days - * XXX: because we often come in with Giant held. For now, there's no way - * XXX: to avoid this. - */ -#ifdef WITNESS - KASSERT(witness_list(curthread) == 0, - ("mb_reclaim() called with locks held")); -#endif + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK | WARN_PANIC, NULL, + "mb_reclaim()"); mbstat.m_drain++; /* XXX: No consistency. */ ==== //depot/projects/smpng/sys/kern/subr_trap.c#42 (text+ko) ==== @@ -163,10 +163,7 @@ CTR3(KTR_SYSC, "ast: thread %p (pid %d, %s)", td, p->p_pid, p->p_comm); KASSERT(TRAPF_USERMODE(framep), ("ast in kernel mode")); -#ifdef WITNESS - if (witness_list(td)) - panic("Returning to user mode with mutex(s) held"); -#endif + WITNESS_WARN(WARN_PANIC, NULL, "Returning to user mode"); mtx_assert(&Giant, MA_NOTOWNED); mtx_assert(&sched_lock, MA_NOTOWNED); td->td_frame = framep; ==== //depot/projects/smpng/sys/powerpc/powerpc/trap.c#27 (text+ko) ==== @@ -473,12 +473,8 @@ */ STOPEVENT(p, S_SCX, code); -#ifdef WITNESS - if (witness_list(td)) { - panic("system call %s returning with mutex(s) held\n", - syscallnames[code]); - } -#endif + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + syscallnames[code]); mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); } ==== //depot/projects/smpng/sys/sparc64/sparc64/trap.c#43 (text+ko) ==== @@ -632,12 +632,8 @@ #ifdef INVARIANTS cred_free_thread(td); #endif -#ifdef WITNESS - if (witness_list(td)) { - panic("system call %s returning with mutex(s) held\n", - syscallnames[code]); - } -#endif + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", + syscallnames[code]); mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message