Module Name:    src
Committed By:   jym
Date:           Tue Sep 27 01:02:39 UTC 2011

Modified Files:
        src/sys/arch/evbmips/evbmips: interrupt.c
        src/sys/arch/mips/mips: mips_softint.c pmap_tlb.c syscall.c
            vm_machdep.c
        src/sys/arch/mips/ralink: ralink_gpio.c ralink_intr.c
        src/sys/arch/mips/rmi: rmixl_fmn.c rmixl_intr.c
        src/sys/arch/powerpc/booke: booke_pmap.c e500_intr.c trap.c
        src/sys/arch/powerpc/booke/dev: pq3etsec.c
        src/sys/arch/powerpc/booke/pci: pq3pci.c
        src/sys/arch/powerpc/include: userret.h
        src/sys/arch/powerpc/include/oea: pmap.h
        src/sys/arch/powerpc/pic: intr.c
        src/sys/arch/powerpc/powerpc: process_machdep.c softint_machdep.c
            trap.c
        src/sys/arch/x86/x86: pmap.c
        src/sys/arch/xen/x86: xen_ipi.c
        src/sys/common/pmap/tlb: pmap.c pmap_tlb.c
        src/sys/dev/ic: siisata.c
        src/sys/dev/usb: usb_mem.c
        src/sys/kern: kern_mutex_obj.c kern_softint.c kern_synch.c subr_evcnt.c
            subr_pcu.c subr_pool.c
        src/sys/lib/libkern: libkern.h
        src/sys/uvm: uvm_bio.c uvm_map.c uvm_pglist.c

Log Message:
Modify *ASSERTMSG() so they are now used as variadic macros. The main goal
is to provide routines that do as KASSERT(9) says: append a message
to the panic format string when the assertion triggers, with optional
arguments.

Fix call sites to reflect the new definition.

Discussed on tech-kern@. See
http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbmips/evbmips/interrupt.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/mips/mips_softint.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/pmap_tlb.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/mips/mips/syscall.c
cvs rdiff -u -r1.140 -r1.141 src/sys/arch/mips/mips/vm_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ralink/ralink_gpio.c \
    src/sys/arch/mips/ralink/ralink_intr.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/rmi/rmixl_fmn.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/rmi/rmixl_intr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/booke_pmap.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/booke/e500_intr.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/booke/trap.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/booke/dev/pq3etsec.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/booke/pci/pq3pci.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/include/userret.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/powerpc/powerpc/process_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/powerpc/softint_machdep.c
cvs rdiff -u -r1.144 -r1.145 src/sys/arch/powerpc/powerpc/trap.c
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/xen/x86/xen_ipi.c
cvs rdiff -u -r1.9 -r1.10 src/sys/common/pmap/tlb/pmap.c
cvs rdiff -u -r1.10 -r1.11 src/sys/common/pmap/tlb/pmap_tlb.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/siisata.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/usb/usb_mem.c
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/kern_mutex_obj.c
cvs rdiff -u -r1.37 -r1.38 src/sys/kern/kern_softint.c
cvs rdiff -u -r1.290 -r1.291 src/sys/kern/kern_synch.c
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/subr_evcnt.c
cvs rdiff -u -r1.9 -r1.10 src/sys/kern/subr_pcu.c
cvs rdiff -u -r1.189 -r1.190 src/sys/kern/subr_pool.c
cvs rdiff -u -r1.100 -r1.101 src/sys/lib/libkern/libkern.h
cvs rdiff -u -r1.78 -r1.79 src/sys/uvm/uvm_bio.c
cvs rdiff -u -r1.304 -r1.305 src/sys/uvm/uvm_map.c
cvs rdiff -u -r1.61 -r1.62 src/sys/uvm/uvm_pglist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbmips/evbmips/interrupt.c
diff -u src/sys/arch/evbmips/evbmips/interrupt.c:1.17 src/sys/arch/evbmips/evbmips/interrupt.c:1.18
--- src/sys/arch/evbmips/evbmips/interrupt.c:1.17	Sun Jul 10 00:03:53 2011
+++ src/sys/arch/evbmips/evbmips/interrupt.c	Tue Sep 27 01:02:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: interrupt.c,v 1.17 2011/07/10 00:03:53 matt Exp $	*/
+/*	$NetBSD: interrupt.c,v 1.18 2011/09/27 01:02:33 jym Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.17 2011/07/10 00:03:53 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.18 2011/09/27 01:02:33 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -66,15 +66,14 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s
 		splx(ipl);	/* lower to interrupt level */
 
 		KASSERTMSG(ci->ci_cpl == ipl,
-		    ("%s: cpl (%d) != ipl (%d)",
-		    __func__, ci->ci_cpl, ipl));
+		    "%s: cpl (%d) != ipl (%d)", __func__, ci->ci_cpl, ipl);
 		KASSERT(pending != 0);
 
 		if (pending & MIPS_INT_MASK_5) {
 			struct clockframe cf;
 			KASSERTMSG(ipl == IPL_SCHED,
-			    ("%s: ipl (%d) != IPL_SCHED (%d)",
-			     __func__, ipl, IPL_SCHED));
+			    "%s: ipl (%d) != IPL_SCHED (%d)",
+			     __func__, ipl, IPL_SCHED);
 			/* call the common MIPS3 clock interrupt handler */ 
 			cf.pc = pc;
 			cf.sr = status;

Index: src/sys/arch/mips/mips/mips_softint.c
diff -u src/sys/arch/mips/mips/mips_softint.c:1.5 src/sys/arch/mips/mips/mips_softint.c:1.6
--- src/sys/arch/mips/mips/mips_softint.c:1.5	Sun Jul 10 23:13:22 2011
+++ src/sys/arch/mips/mips/mips_softint.c	Tue Sep 27 01:02:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_softint.c,v 1.5 2011/07/10 23:13:22 matt Exp $	*/
+/*	$NetBSD: mips_softint.c,v 1.6 2011/09/27 01:02:34 jym Exp $	*/
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_softint.c,v 1.5 2011/07/10 23:13:22 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_softint.c,v 1.6 2011/09/27 01:02:34 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -101,7 +101,7 @@ softint_trigger(uintptr_t si)
 		softint_fast_dispatch(ci->ci_softlwps[SOFTINT_##level], \
 		    IPL_SOFT##level); \
 		KASSERT(ci->ci_softlwps[SOFTINT_##level]->l_ctxswtch == 0); \
-		KASSERTMSG(ci->ci_cpl == IPL_HIGH, ("cpl (%d) != HIGH", ci->ci_cpl)); \
+		KASSERTMSG(ci->ci_cpl == IPL_HIGH, "cpl (%d) != HIGH", ci->ci_cpl); \
 		continue; \
 	}
 
@@ -115,8 +115,8 @@ softint_process(uint32_t ipending)
 	KASSERT((ipending & ~MIPS_SOFT_INT_MASK) == 0);
 	KASSERT(ci->ci_cpl == IPL_HIGH);
 	KASSERTMSG(ci->ci_mtx_count == 0,
-	    ("%s: cpu%u (%p): ci_mtx_count (%d) != 0",
-	     __func__, cpu_index(ci), ci, ci->ci_mtx_count));
+	    "%s: cpu%u (%p): ci_mtx_count (%d) != 0",
+	     __func__, cpu_index(ci), ci, ci->ci_mtx_count);
 
 	if (ipending & MIPS_SOFT_INT_MASK_0) {
 		/*

Index: src/sys/arch/mips/mips/pmap_tlb.c
diff -u src/sys/arch/mips/mips/pmap_tlb.c:1.7 src/sys/arch/mips/mips/pmap_tlb.c:1.8
--- src/sys/arch/mips/mips/pmap_tlb.c:1.7	Thu Apr 14 17:41:32 2011
+++ src/sys/arch/mips/mips/pmap_tlb.c	Tue Sep 27 01:02:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.7 2011/04/14 17:41:32 matt Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.8 2011/09/27 01:02:34 jym Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.7 2011/04/14 17:41:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.8 2011/09/27 01:02:34 jym Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -440,8 +440,8 @@ pmap_tlb_shootdown_process(void)
 
 	KASSERT(cpu_intr_p());
 	KASSERTMSG(ci->ci_cpl >= IPL_SCHED,
-	    ("%s: cpl (%d) < IPL_SCHED (%d)",
-	    __func__, ci->ci_cpl, IPL_SCHED));
+	    "%s: cpl (%d) < IPL_SCHED (%d)",
+	    __func__, ci->ci_cpl, IPL_SCHED);
 	TLBINFO_LOCK(ti);
 
 	switch (ti->ti_tlbinvop) {
@@ -815,8 +815,8 @@ pmap_tlb_asid_deactivate(pmap_t pm)
 		const uint32_t cpu_mask = 1 << cpu_index(ci);
 		KASSERT(!cpu_intr_p());
 		KASSERTMSG(pm->pm_onproc & cpu_mask,
-		    ("%s: pmap %p onproc %#x doesn't include cpu %d (%p)",
-		    __func__, pm, pm->pm_onproc, cpu_index(ci), ci));
+		    "%s: pmap %p onproc %#x doesn't include cpu %d (%p)",
+		    __func__, pm, pm->pm_onproc, cpu_index(ci), ci);
 		/*
 		 * The bits in pm_onproc that belong to this TLB can
 		 * be changed while this TLBs lock is not held as long
@@ -1028,8 +1028,8 @@ pmap_tlb_asid_check(void)
 	__asm("mfc0 %0,$%1" : "=r"(tlb_hi) : "n"(MIPS_COP_0_TLB_HI));
 	uint32_t asid = (tlb_hi & MIPS_TLB_PID) >> MIPS_TLB_PID_SHIFT;
 	KDASSERTMSG(asid == curcpu()->ci_pmap_asid_cur,
-	   ("tlb_hi (%#x) asid (%#x) != current asid (%#x)",
-	    tlb_hi, asid, curcpu()->ci_pmap_asid_cur));
+	   "tlb_hi (%#x) asid (%#x) != current asid (%#x)",
+	    tlb_hi, asid, curcpu()->ci_pmap_asid_cur);
 	kpreempt_enable();
 #endif
 }

Index: src/sys/arch/mips/mips/syscall.c
diff -u src/sys/arch/mips/mips/syscall.c:1.45 src/sys/arch/mips/mips/syscall.c:1.46
--- src/sys/arch/mips/mips/syscall.c:1.45	Sun Jul 10 23:21:59 2011
+++ src/sys/arch/mips/mips/syscall.c	Tue Sep 27 01:02:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.c,v 1.45 2011/07/10 23:21:59 matt Exp $	*/
+/*	$NetBSD: syscall.c,v 1.46 2011/09/27 01:02:34 jym Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.45 2011/07/10 23:21:59 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.46 2011/09/27 01:02:34 jym Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sa.h"
@@ -136,8 +136,8 @@ EMULNAME(syscall)(struct lwp *l, u_int s
 #if defined(__mips_o32)
 	const int abi = _MIPS_BSD_API_O32;
 	KASSERTMSG(p->p_md.md_abi == abi,
-	    ("pid %d(%p): md_abi(%d) != abi(%d)",
-	    p->p_pid, p, p->p_md.md_abi, abi));
+	    "pid %d(%p): md_abi(%d) != abi(%d)",
+	    p->p_pid, p, p->p_md.md_abi, abi);
 	size_t nregs = 4;
 #else
 	const int abi = p->p_md.md_abi;

Index: src/sys/arch/mips/mips/vm_machdep.c
diff -u src/sys/arch/mips/mips/vm_machdep.c:1.140 src/sys/arch/mips/mips/vm_machdep.c:1.141
--- src/sys/arch/mips/mips/vm_machdep.c:1.140	Thu Sep  1 06:41:38 2011
+++ src/sys/arch/mips/mips/vm_machdep.c	Tue Sep 27 01:02:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.140 2011/09/01 06:41:38 matt Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.141 2011/09/27 01:02:34 jym Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.140 2011/09/01 06:41:38 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.141 2011/09/27 01:02:34 jym Exp $");
 
 #include "opt_ddb.h"
 #include "opt_coredump.h"
@@ -210,11 +210,11 @@ cpu_uarea_alloc(bool system)
 	KASSERT(pg != NULL);
 	const paddr_t pa = VM_PAGE_TO_PHYS(pg);
 	KASSERTMSG(pa >= mips_avail_start,
-	    ("pa (%#"PRIxPADDR") < mips_avail_start (%#"PRIxPADDR")",
-	     pa, mips_avail_start));
+	    "pa (%#"PRIxPADDR") < mips_avail_start (%#"PRIxPADDR")",
+	     pa, mips_avail_start);
 	KASSERTMSG(pa < mips_avail_end,
-	    ("pa (%#"PRIxPADDR") >= mips_avail_end (%#"PRIxPADDR")",
-	     pa, mips_avail_end));
+	    "pa (%#"PRIxPADDR") >= mips_avail_end (%#"PRIxPADDR")",
+	     pa, mips_avail_end);
 
 	/*
 	 * we need to return a direct-mapped VA for the pa.

Index: src/sys/arch/mips/ralink/ralink_gpio.c
diff -u src/sys/arch/mips/ralink/ralink_gpio.c:1.2 src/sys/arch/mips/ralink/ralink_gpio.c:1.3
--- src/sys/arch/mips/ralink/ralink_gpio.c:1.2	Thu Jul 28 15:38:49 2011
+++ src/sys/arch/mips/ralink/ralink_gpio.c	Tue Sep 27 01:02:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ralink_gpio.c,v 1.2 2011/07/28 15:38:49 matt Exp $	*/
+/*	$NetBSD: ralink_gpio.c,v 1.3 2011/09/27 01:02:34 jym Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
 /* ra_gpio.c -- Ralink 3052 gpio driver */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.2 2011/07/28 15:38:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.3 2011/09/27 01:02:34 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -411,32 +411,32 @@ static int gpio_driver_blink_leds = 1;
 static inline uint32_t
 sy_read(ra_gpio_softc_t *sc, bus_size_t off)
 {
-	KASSERTMSG((off & 3) == 0, ("%s: unaligned off=%#" PRIxBUSSIZE "\n",
-		__func__, off));
+	KASSERTMSG((off & 3) == 0, "%s: unaligned off=%#" PRIxBUSSIZE "\n",
+		__func__, off);
 	return bus_space_read_4(sc->sc_memt, sc->sc_sy_memh, off);
 }
 
 static inline void
 sy_write(ra_gpio_softc_t *sc, bus_size_t off, uint32_t val)
 {
-	KASSERTMSG((off & 3) == 0, ("%s: unaligned off=%#" PRIxBUSSIZE "\n",
-		__func__, off));
+	KASSERTMSG((off & 3) == 0, "%s: unaligned off=%#" PRIxBUSSIZE "\n",
+		__func__, off);
 	bus_space_write_4(sc->sc_memt, sc->sc_sy_memh, off, val);
 }
 
 static inline uint32_t
 gp_read(ra_gpio_softc_t *sc, bus_size_t off)
 {
-	KASSERTMSG((off & 3) == 0, ("%s: unaligned off=%#" PRIxBUSSIZE "\n",
-		__func__, off));
+	KASSERTMSG((off & 3) == 0, "%s: unaligned off=%#" PRIxBUSSIZE "\n",
+		__func__, off);
 	return bus_space_read_4(sc->sc_memt, sc->sc_gp_memh, off);
 }
 
 static inline void
 gp_write(ra_gpio_softc_t *sc, bus_size_t off, uint32_t val)
 {
-	KASSERTMSG((off & 3) == 0, ("%s: unaligned off=%#" PRIxBUSSIZE "\n",
-		__func__, off));
+	KASSERTMSG((off & 3) == 0, "%s: unaligned off=%#" PRIxBUSSIZE "\n",
+		__func__, off);
 	bus_space_write_4(sc->sc_memt, sc->sc_gp_memh, off, val);
 }
 
@@ -760,8 +760,8 @@ ra_gpio_pin_read(void *arg, int pin)
 		 * then warn and return 0
 		 */
 		const int index = pin_tab_index[pin];
-		KASSERTMSG(index != -1, ("%s: non-existant pin=%d\n",
-			__func__, pin));
+		KASSERTMSG(index != -1, "%s: non-existant pin=%d\n",
+			__func__, pin);
 		if (index == -1) {
 			rv = 0;
 		} else {
@@ -853,7 +853,7 @@ ra_gpio_pin_write(void *arg, int pin, in
 	 * then warn and return
 	 */
 	const int index = pin_tab_index[pin];
-	KASSERTMSG(index != -1, ("%s: non-existant pin=%d\n", __func__, pin));
+	KASSERTMSG(index != -1, "%s: non-existant pin=%d\n", __func__, pin);
 	if (index == -1)
 		return;
 
@@ -1236,7 +1236,7 @@ disable_gpio_interrupt(ra_gpio_softc_t *
 {
 	RALINK_DEBUG_FUNC_ENTRY();
 	const int index = pin_tab_index[pin];
-	KASSERTMSG(index != -1, ("%s: non-existant pin=%d\n", __func__, pin));
+	KASSERTMSG(index != -1, "%s: non-existant pin=%d\n", __func__, pin);
 	if (index == -1)
 		return;
 
@@ -1260,7 +1260,7 @@ static void
 enable_gpio_interrupt(ra_gpio_softc_t *sc, int pin)
 {
 	const int index = pin_tab_index[pin];
-	KASSERTMSG(index != -1, ("%s: non-existant pin=%d\n", __func__, pin));
+	KASSERTMSG(index != -1, "%s: non-existant pin=%d\n", __func__, pin);
 	if (index == -1)
 		return;
 
Index: src/sys/arch/mips/ralink/ralink_intr.c
diff -u src/sys/arch/mips/ralink/ralink_intr.c:1.2 src/sys/arch/mips/ralink/ralink_intr.c:1.3
--- src/sys/arch/mips/ralink/ralink_intr.c:1.2	Thu Jul 28 15:38:49 2011
+++ src/sys/arch/mips/ralink/ralink_intr.c	Tue Sep 27 01:02:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ralink_intr.c,v 1.2 2011/07/28 15:38:49 matt Exp $	*/
+/*	$NetBSD: ralink_intr.c,v 1.3 2011/09/27 01:02:34 jym Exp $	*/
 /*-
  * Copyright (c) 2011 CradlePoint Technology, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
 #define __INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ralink_intr.c,v 1.2 2011/07/28 15:38:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_intr.c,v 1.3 2011/09/27 01:02:34 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -208,7 +208,7 @@ ra_intr_establish(int intr, int (*func)(
 	struct evbmips_intrhand *ih;
 
 	if ((ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT)) == NULL) {
-		KASSERTMSG(0, ("%s: cannot malloc intrhand", __func__));
+		KASSERTMSG(0, "%s: cannot malloc intrhand", __func__);
 		return NULL;
 	}
 

Index: src/sys/arch/mips/rmi/rmixl_fmn.c
diff -u src/sys/arch/mips/rmi/rmixl_fmn.c:1.3 src/sys/arch/mips/rmi/rmixl_fmn.c:1.4
--- src/sys/arch/mips/rmi/rmixl_fmn.c:1.3	Fri Apr 29 21:55:20 2011
+++ src/sys/arch/mips/rmi/rmixl_fmn.c	Tue Sep 27 01:02:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_fmn.c,v 1.3 2011/04/29 21:55:20 matt Exp $	*/
+/*	$NetBSD: rmixl_fmn.c,v 1.4 2011/09/27 01:02:34 jym Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -405,8 +405,8 @@ rmixl_fmn_init(void)
 	fmn_t *fmnp;
 	static bool once=false;
 
-	KASSERTMSG((CPU_IS_PRIMARY(curcpu())), ("ci=%p, index=%d\n",
-		curcpu(), cpu_index(curcpu())));
+	KASSERTMSG((CPU_IS_PRIMARY(curcpu())), "ci=%p, index=%d\n",
+		curcpu(), cpu_index(curcpu()));
 	fmnp = fmn_lookup(curcpu()->ci_cpuid);
 
 	if (once == true)

Index: src/sys/arch/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.7 src/sys/arch/mips/rmi/rmixl_intr.c:1.8
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.7	Sun Jul 10 23:13:22 2011
+++ src/sys/arch/mips/rmi/rmixl_intr.c	Tue Sep 27 01:02:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_intr.c,v 1.7 2011/07/10 23:13:22 matt Exp $	*/
+/*	$NetBSD: rmixl_intr.c,v 1.8 2011/09/27 01:02:34 jym Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.7 2011/07/10 23:13:22 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.8 2011/09/27 01:02:34 jym Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -928,9 +928,9 @@ evbmips_iointr(int ipl, vaddr_t pc, uint
 				(void)(*ih->ih_func)(ih->ih_arg);
 			} else {
 				KASSERTMSG(ipl == IPL_VM,
-				    ("%s: %s: ipl (%d) != IPL_VM for KERNEL_LOCK",
+				    "%s: %s: ipl (%d) != IPL_VM for KERNEL_LOCK",
 				    __func__, sc->sc_vec_evcnts[vec].ev_name,
-				    ipl));
+				    ipl);
 				KERNEL_LOCK(1, NULL);
 				(void)(*ih->ih_func)(ih->ih_arg);
 				KERNEL_UNLOCK_ONE(NULL);
@@ -941,9 +941,9 @@ evbmips_iointr(int ipl, vaddr_t pc, uint
 		}
 		KASSERT(ipl == ih->ih_ipl);
 		KASSERTMSG(curcpu()->ci_cpl >= ipl,
-		    ("%s: after %s: cpl (%d) < ipl %d",
+		    "%s: after %s: cpl (%d) < ipl %d",
 		    __func__, sc->sc_vec_evcnts[vec].ev_name,
-		    ipl, curcpu()->ci_cpl));
+		    ipl, curcpu()->ci_cpl);
 		sc->sc_vec_evcnts[vec].ev_count++;
 	}
 }

Index: src/sys/arch/powerpc/booke/booke_pmap.c
diff -u src/sys/arch/powerpc/booke/booke_pmap.c:1.9 src/sys/arch/powerpc/booke/booke_pmap.c:1.10
--- src/sys/arch/powerpc/booke/booke_pmap.c:1.9	Wed Jun 29 21:53:10 2011
+++ src/sys/arch/powerpc/booke/booke_pmap.c	Tue Sep 27 01:02:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: booke_pmap.c,v 1.9 2011/06/29 21:53:10 dholland Exp $	*/
+/*	$NetBSD: booke_pmap.c,v 1.10 2011/09/27 01:02:35 jym Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.9 2011/06/29 21:53:10 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.10 2011/09/27 01:02:35 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/kcore.h>
@@ -325,8 +325,8 @@ pmap_md_tlb_check_entry(void *ctx, vaddr
 	xpte ^= xpte & (PTE_UNSYNCED|PTE_UNMODIFIED|PTE_WIRED);
 
 	KASSERTMSG(pte == xpte,
-	    ("pm=%p va=%#"PRIxVADDR" asid=%u: TLB pte (%#x) != real pte (%#x/%#x)",
-	    pm, va, asid, pte, xpte, *ptep));
+	    "pm=%p va=%#"PRIxVADDR" asid=%u: TLB pte (%#x) != real pte (%#x/%#x)",
+	    pm, va, asid, pte, xpte, *ptep);
 
 	return true;
 }

Index: src/sys/arch/powerpc/booke/e500_intr.c
diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.15 src/sys/arch/powerpc/booke/e500_intr.c:1.16
--- src/sys/arch/powerpc/booke/e500_intr.c:1.15	Wed Jun 29 21:53:11 2011
+++ src/sys/arch/powerpc/booke/e500_intr.c	Tue Sep 27 01:02:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_intr.c,v 1.15 2011/06/29 21:53:11 dholland Exp $	*/
+/*	$NetBSD: e500_intr.c,v 1.16 2011/09/27 01:02:35 jym Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
 #define __INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.15 2011/06/29 21:53:11 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.16 2011/09/27 01:02:35 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -1052,11 +1052,11 @@ static void
 e500_idlespin(void)
 {
 	KASSERTMSG(curcpu()->ci_cpl == IPL_NONE,
-	    ("%s: cpu%u: ci_cpl (%d) != 0", __func__, cpu_number(),
-	     curcpu()->ci_cpl));
+	    "%s: cpu%u: ci_cpl (%d) != 0", __func__, cpu_number(),
+	     curcpu()->ci_cpl);
 	KASSERTMSG(CTPR2IPL(openpic_read(curcpu()->ci_softc, OPENPIC_CTPR)) == IPL_NONE,
-	    ("%s: cpu%u: CTPR (%d) != IPL_NONE", __func__, cpu_number(),
-	     CTPR2IPL(openpic_read(curcpu()->ci_softc, OPENPIC_CTPR))));
+	    "%s: cpu%u: CTPR (%d) != IPL_NONE", __func__, cpu_number(),
+	     CTPR2IPL(openpic_read(curcpu()->ci_softc, OPENPIC_CTPR)));
 	KASSERT(mfmsr() & PSL_EE);
 
 	if (powersave > 0)
@@ -1154,8 +1154,8 @@ e500_intr_cpu_send_ipi(cpuid_t target, u
 		struct cpu_info * const dst_ci = cpu_lookup(target);
 		KASSERT(dst_ci != NULL);
 		KASSERTMSG(target == cpu_index(dst_ci),
-		    ("%s: target (%lu) != cpu_index(cpu%u)",
-		     __func__, target, cpu_index(dst_ci)));
+		    "%s: target (%lu) != cpu_index(cpu%u)",
+		     __func__, target, cpu_index(dst_ci));
 		dstmask = (1 << target);
 		if (ipimsg)
 			atomic_or_32(&dst_ci->ci_pending_ipis, ipimsg);

Index: src/sys/arch/powerpc/booke/trap.c
diff -u src/sys/arch/powerpc/booke/trap.c:1.12 src/sys/arch/powerpc/booke/trap.c:1.13
--- src/sys/arch/powerpc/booke/trap.c:1.12	Tue Jun 21 06:38:50 2011
+++ src/sys/arch/powerpc/booke/trap.c	Tue Sep 27 01:02:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.12 2011/06/21 06:38:50 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.13 2011/09/27 01:02:35 jym Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.12 2011/06/21 06:38:50 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.13 2011/09/27 01:02:35 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -689,7 +689,7 @@ trap(enum ppc_booke_exceptions trap_code
 	ci->ci_data.cpu_ntrap++;
 
 	KASSERTMSG(!usertrap || tf == trapframe(l),
-	    ("trap: tf=%p is invalid: trapframe(%p)=%p", tf, l, trapframe(l)));
+	    "trap: tf=%p is invalid: trapframe(%p)=%p", tf, l, trapframe(l));
 
 #if 0
 	if (trap_code != T_PROGRAM || usertrap)

Index: src/sys/arch/powerpc/booke/dev/pq3etsec.c
diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.7 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.8
--- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.7	Mon Aug  1 17:05:17 2011
+++ src/sys/arch/powerpc/booke/dev/pq3etsec.c	Tue Sep 27 01:02:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3etsec.c,v 1.7 2011/08/01 17:05:17 matt Exp $	*/
+/*	$NetBSD: pq3etsec.c,v 1.8 2011/09/27 01:02:35 jym Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.7 2011/08/01 17:05:17 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.8 2011/09/27 01:02:35 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -2036,11 +2036,13 @@ pq3etsec_txq_consume(
 
 			IF_DEQUEUE(&txq->txq_mbufs, m);
 #ifdef ETSEC_DEBUG
-			KASSERTMSG(m == txq->txq_lmbufs[consumer-txq->txq_first],
-			    ("%s: %p [%u]: flags %#x m (%p) != %p (%p)", __func__,
-			     consumer, consumer - txq->txq_first, txbd_flags,
-			     m, &txq->txq_lmbufs[consumer-txq->txq_first],
-			     txq->txq_lmbufs[consumer-txq->txq_first]));
+			KASSERTMSG(
+			    m == txq->txq_lmbufs[consumer-txq->txq_first],
+			    "%s: %p [%u]: flags %#x m (%p) != %p (%p)",
+			    __func__, consumer, consumer - txq->txq_first,
+			    txbd_flags, m,
+			    &txq->txq_lmbufs[consumer-txq->txq_first],
+			    txq->txq_lmbufs[consumer-txq->txq_first]);
 #endif
 			KASSERT(m);
 			pq3etsec_txq_map_unload(sc, txq, m);

Index: src/sys/arch/powerpc/booke/pci/pq3pci.c
diff -u src/sys/arch/powerpc/booke/pci/pq3pci.c:1.10 src/sys/arch/powerpc/booke/pci/pq3pci.c:1.11
--- src/sys/arch/powerpc/booke/pci/pq3pci.c:1.10	Wed Aug 17 18:52:00 2011
+++ src/sys/arch/powerpc/booke/pci/pq3pci.c	Tue Sep 27 01:02:35 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3pci.c,v 1.10 2011/08/17 18:52:00 matt Exp $	*/
+/*	$NetBSD: pq3pci.c,v 1.11 2011/09/27 01:02:35 jym Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -44,7 +44,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pq3pci.c,v 1.10 2011/08/17 18:52:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3pci.c,v 1.11 2011/09/27 01:02:35 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -524,9 +524,9 @@ pq3pci_msi_intr(void *v)
 			 * if MSIs are working, just clear the free MSIs.
 			 */
 			KASSERTMSG((group & msig->msig_free_mask) == 0,
-			   ("%s: group#%u: unexpected MSIs (%#x)",
+			   "%s: group#%u: unexpected MSIs (%#x)",
 			    __func__, msig->msig_group,
-			    group & msig->msig_free_mask));
+			    group & msig->msig_free_mask);
 			group &= ~msig->msig_free_mask;
 		} else {
 			/*

Index: src/sys/arch/powerpc/include/userret.h
diff -u src/sys/arch/powerpc/include/userret.h:1.21 src/sys/arch/powerpc/include/userret.h:1.22
--- src/sys/arch/powerpc/include/userret.h:1.21	Mon Jun 20 06:00:46 2011
+++ src/sys/arch/powerpc/include/userret.h	Tue Sep 27 01:02:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.21 2011/06/20 06:00:46 matt Exp $	*/
+/*	$NetBSD: userret.h,v 1.22 2011/09/27 01:02:36 jym Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -52,7 +52,7 @@ static __inline void
 userret(struct lwp *l, struct trapframe *tf)
 {
 	KASSERTMSG((tf == trapframe(curlwp)),
-	   ("tf=%p, trapframe(curlwp)=%p\n", tf, trapframe(curlwp)));
+	   "tf=%p, trapframe(curlwp)=%p\n", tf, trapframe(curlwp));
 
 	/* Invoke MI userret code */
 	mi_userret(l);

Index: src/sys/arch/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.25 src/sys/arch/powerpc/include/oea/pmap.h:1.26
--- src/sys/arch/powerpc/include/oea/pmap.h:1.25	Thu Jun 30 00:52:59 2011
+++ src/sys/arch/powerpc/include/oea/pmap.h	Tue Sep 27 01:02:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.25 2011/06/30 00:52:59 matt Exp $	*/
+/*	$NetBSD: pmap.h,v 1.26 2011/09/27 01:02:36 jym Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -177,7 +177,7 @@ vtophys(vaddr_t va)
 
 	if (pmap_extract(pmap_kernel(), va, &pa))
 		return pa;
-	KASSERTMSG(0, ("vtophys: pmap_extract of %#"PRIxVADDR" failed", va));
+	KASSERTMSG(0, "vtophys: pmap_extract of %#"PRIxVADDR" failed", va);
 	return (paddr_t) -1;
 }
 

Index: src/sys/arch/powerpc/pic/intr.c
diff -u src/sys/arch/powerpc/pic/intr.c:1.17 src/sys/arch/powerpc/pic/intr.c:1.18
--- src/sys/arch/powerpc/pic/intr.c:1.17	Tue Jun 21 18:02:43 2011
+++ src/sys/arch/powerpc/pic/intr.c	Tue Sep 27 01:02:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.17 2011/06/21 18:02:43 rjs Exp $ */
+/*	$NetBSD: intr.c,v 1.18 2011/09/27 01:02:36 jym Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.17 2011/06/21 18:02:43 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.18 2011/09/27 01:02:36 jym Exp $");
 
 #include "opt_interrupt.h"
 #include "opt_multiprocessor.h"
@@ -438,9 +438,9 @@ intr_deliver(struct intr_source *is, int
 	bool locked = false;
 	for (struct intrhand *ih = is->is_hand; ih != NULL; ih = ih->ih_next) {
 		KASSERTMSG(ih->ih_fun != NULL,
-		    ("%s: irq %d, hwirq %d, is %p ih %p: "
+		    "%s: irq %d, hwirq %d, is %p ih %p: "
 		     "NULL interrupt handler!\n", __func__,
-		     virq, is->is_hwirq, is, ih));
+		     virq, is->is_hwirq, is, ih);
 		if (ih->ih_ipl == IPL_VM) {
 			if (!locked) {
 				KERNEL_LOCK(1, NULL);

Index: src/sys/arch/powerpc/powerpc/process_machdep.c
diff -u src/sys/arch/powerpc/powerpc/process_machdep.c:1.34 src/sys/arch/powerpc/powerpc/process_machdep.c:1.35
--- src/sys/arch/powerpc/powerpc/process_machdep.c:1.34	Mon Jun 20 05:50:39 2011
+++ src/sys/arch/powerpc/powerpc/process_machdep.c	Tue Sep 27 01:02:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: process_machdep.c,v 1.34 2011/06/20 05:50:39 matt Exp $	*/
+/*	$NetBSD: process_machdep.c,v 1.35 2011/09/27 01:02:36 jym Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.34 2011/06/20 05:50:39 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.35 2011/09/27 01:02:36 jym Exp $");
 
 #include "opt_altivec.h"
 
@@ -94,8 +94,8 @@ process_read_fpregs(struct lwp *l, struc
 		fpu_save();
 	} else {
 		KASSERTMSG(l->l_pcu_cpu[PCU_FPU] == NULL,
-		    ("%s: FPU of l (%p) active on cpu%u",
-		     __func__, l, cpu_index(l->l_pcu_cpu[PCU_FPU])));
+		    "%s: FPU of l (%p) active on cpu%u",
+		     __func__, l, cpu_index(l->l_pcu_cpu[PCU_FPU]));
 #endif
 	}
 	*fpregs = pcb->pcb_fpu;
@@ -165,8 +165,8 @@ process_machdep_read_vecregs(struct lwp 
 		*vregs = pcb->pcb_vr;
 	} else {
 		KASSERTMSG(l->l_pcu_cpu[PCU_VEC] == NULL,
-		    ("%s: VEC of l (%p) active on cpu%u",
-		     __func__, l, cpu_index(l->l_pcu_cpu[PCU_FPU])));
+		    "%s: VEC of l (%p) active on cpu%u",
+		     __func__, l, cpu_index(l->l_pcu_cpu[PCU_FPU]));
 	}
 	vec_mark_used(l);
 

Index: src/sys/arch/powerpc/powerpc/softint_machdep.c
diff -u src/sys/arch/powerpc/powerpc/softint_machdep.c:1.2 src/sys/arch/powerpc/powerpc/softint_machdep.c:1.3
--- src/sys/arch/powerpc/powerpc/softint_machdep.c:1.2	Tue Jun 21 04:22:25 2011
+++ src/sys/arch/powerpc/powerpc/softint_machdep.c	Tue Sep 27 01:02:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: softint_machdep.c,v 1.2 2011/06/21 04:22:25 matt Exp $	*/
+/*	$NetBSD: softint_machdep.c,v 1.3 2011/09/27 01:02:36 jym Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -60,7 +60,7 @@ softint_deliver(struct cpu_info *ci, int
 	softint_fast_dispatch(ci->ci_softlwps[si_level], ipl);
 	KASSERT(ci->ci_softlwps[si_level]->l_ctxswtch == 0);
 	KASSERTMSG(ci->ci_cpl == IPL_HIGH,
-	    ("%s: cpl (%d) != HIGH", __func__, ci->ci_cpl));
+	    "%s: cpl (%d) != HIGH", __func__, ci->ci_cpl);
 }
 
 void
@@ -70,8 +70,8 @@ powerpc_softint(struct cpu_info *ci, int
 	u_int softints;
 
 	KASSERTMSG(ci->ci_idepth == -1,
-	    ("%s: cpu%u: idepth (%d) != -1", __func__,
-	     cpu_index(ci), ci->ci_idepth));
+	    "%s: cpu%u: idepth (%d) != -1", __func__,
+	     cpu_index(ci), ci->ci_idepth);
 	KASSERT(ci->ci_mtx_count == 0);
 	KASSERT(ci->ci_cpl == IPL_HIGH);
 	while ((softints = (ci->ci_data.cpu_softints & softint_mask)) != 0) {

Index: src/sys/arch/powerpc/powerpc/trap.c
diff -u src/sys/arch/powerpc/powerpc/trap.c:1.144 src/sys/arch/powerpc/powerpc/trap.c:1.145
--- src/sys/arch/powerpc/powerpc/trap.c:1.144	Tue Jun 21 06:38:50 2011
+++ src/sys/arch/powerpc/powerpc/trap.c	Tue Sep 27 01:02:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.144 2011/06/21 06:38:50 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.145 2011/09/27 01:02:36 jym Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.144 2011/06/21 06:38:50 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.145 2011/09/27 01:02:36 jym Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -95,7 +95,7 @@ trap(struct trapframe *tf)
 	ci->ci_ev_traps.ev_count++;
 
 	KASSERTMSG(!usertrap || tf == l->l_md.md_utf,
-	    ("trap: tf=%p is invalid: trapframe(%p)=%p", tf, l, l->l_md.md_utf));
+	    "trap: tf=%p is invalid: trapframe(%p)=%p", tf, l, l->l_md.md_utf);
 
 	if (usertrap) {
 		type |= EXC_USER;

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.131 src/sys/arch/x86/x86/pmap.c:1.132
--- src/sys/arch/x86/x86/pmap.c:1.131	Sun Sep 25 18:39:30 2011
+++ src/sys/arch/x86/x86/pmap.c	Tue Sep 27 01:02:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.131 2011/09/25 18:39:30 jym Exp $	*/
+/*	$NetBSD: pmap.c,v 1.132 2011/09/27 01:02:37 jym Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.131 2011/09/25 18:39:30 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.132 2011/09/27 01:02:37 jym Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -3207,9 +3207,9 @@ pmap_remove_pte(struct pmap *pmap, struc
 
 	pg = PHYS_TO_VM_PAGE(pmap_pte2pa(opte));
 
-	KASSERTMSG(pg != NULL, ("pmap_remove_pte: unmanaged page marked "
+	KASSERTMSG(pg != NULL, "pmap_remove_pte: unmanaged page marked "
 	    "PG_PVLIST, va = %#" PRIxVADDR ", pa = %#" PRIxPADDR,
-	    va, (paddr_t)pmap_pte2pa(opte)));
+	    va, (paddr_t)pmap_pte2pa(opte));
 
 	KASSERT(uvm_page_locked_p(pg));
 
@@ -3262,8 +3262,7 @@ pmap_remove(struct pmap *pmap, vaddr_t s
 			if (pmap != pmap_kernel()) {
 				ptp = pmap_find_ptp(pmap, va, ptppa, 1);
 				KASSERTMSG(ptp != NULL,
-				    ("pmap_remove: unmanaged PTP detected")
-				);
+				    "pmap_remove: unmanaged PTP detected");
 			} else {
 				/* Never free kernel PTPs. */
 				ptp = NULL;
@@ -3324,8 +3323,7 @@ pmap_remove(struct pmap *pmap, vaddr_t s
 		if (pmap != pmap_kernel()) {
 			ptp = pmap_find_ptp(pmap, va, ptppa, 1);
 			KASSERTMSG(ptp != NULL,
-			    ("pmap_remove: unmanaged PTP detected")
-			);
+			    "pmap_remove: unmanaged PTP detected");
 		} else {
 			/* Never free kernel PTPs. */
 			ptp = NULL;
@@ -3816,10 +3814,10 @@ pmap_enter_ma(struct pmap *pmap, vaddr_t
 	KASSERT(curlwp->l_md.md_gc_pmap != pmap);
 	KASSERT(va < VM_MAX_KERNEL_ADDRESS);
 	KASSERTMSG(va != (vaddr_t)PDP_BASE && va != (vaddr_t)APDP_BASE,
-	    ("pmap_enter: trying to map over PDP/APDP!"));
+	    "pmap_enter: trying to map over PDP/APDP!");
 	KASSERTMSG(va < VM_MIN_KERNEL_ADDRESS ||
 	    pmap_valid_entry(pmap->pm_pdir[pl_i(va, PTP_LEVELS)]),
-	    ("pmap_enter: missing kernel PTP for VA %lx!", va));
+	    "pmap_enter: missing kernel PTP for VA %lx!", va);
 
 #ifdef XEN
 	KASSERT(domid == DOMID_SELF || pa == 0);
@@ -3949,9 +3947,9 @@ pmap_enter_ma(struct pmap *pmap, vaddr_t
 	if ((~opte & (PG_V | PG_PVLIST)) == 0) {
 		pg = PHYS_TO_VM_PAGE(pmap_pte2pa(opte));
 
-		KASSERTMSG(pg != NULL, ("pmap_enter: PG_PVLIST mapping with "
+		KASSERTMSG(pg != NULL, "pmap_enter: PG_PVLIST mapping with "
 		    "unmanaged page pa = 0x%" PRIx64 " (0x%" PRIx64 ")",
-		    (int64_t)pa, (int64_t)atop(pa)));
+		    (int64_t)pa, (int64_t)atop(pa));
 
 		KASSERT(uvm_page_locked_p(pg));
 

Index: src/sys/arch/xen/x86/xen_ipi.c
diff -u src/sys/arch/xen/x86/xen_ipi.c:1.4 src/sys/arch/xen/x86/xen_ipi.c:1.5
--- src/sys/arch/xen/x86/xen_ipi.c:1.4	Mon Aug 15 20:17:12 2011
+++ src/sys/arch/xen/x86/xen_ipi.c	Tue Sep 27 01:02:37 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.4 2011/08/15 20:17:12 cherry Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.5 2011/09/27 01:02:37 jym Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
 
 /* 
  * Based on: x86/ipi.c
- * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.4 2011/08/15 20:17:12 cherry Exp $"); 
+ * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.5 2011/09/27 01:02:37 jym Exp $"); 
  */
 
-__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.4 2011/08/15 20:17:12 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.5 2011/09/27 01:02:37 jym Exp $");
 
 #include <sys/types.h>
 
@@ -165,7 +165,7 @@ xen_send_ipi(struct cpu_info *ci, uint32
 	evtchn = ci->ci_ipi_evtchn;
 
 	KASSERTMSG(valid_ipimask(ipimask) == true, 
-		("xen_send_ipi() called with invalid ipimask\n"));
+		"xen_send_ipi() called with invalid ipimask\n");
 
 	atomic_or_32(&ci->ci_ipis, ipimask);
 	hypervisor_notify_via_evtchn(evtchn);
@@ -180,7 +180,7 @@ xen_broadcast_ipi(uint32_t ipimask)
 	CPU_INFO_ITERATOR cii;
 
 	KASSERTMSG(valid_ipimask(ipimask) == true, 
-		("xen_broadcast_ipi() called with invalid ipimask\n"));
+		"xen_broadcast_ipi() called with invalid ipimask\n");
 
 	/* 
 	 * XXX-cherry: there's an implicit broadcast sending order

Index: src/sys/common/pmap/tlb/pmap.c
diff -u src/sys/common/pmap/tlb/pmap.c:1.9 src/sys/common/pmap/tlb/pmap.c:1.10
--- src/sys/common/pmap/tlb/pmap.c:1.9	Wed Jun 29 05:53:44 2011
+++ src/sys/common/pmap/tlb/pmap.c	Tue Sep 27 01:02:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.9 2011/06/29 05:53:44 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.10 2011/09/27 01:02:37 jym Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.9 2011/06/29 05:53:44 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.10 2011/09/27 01:02:37 jym Exp $");
 
 /*
  *	Manages physical address maps.
@@ -956,7 +956,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd
 #endif
 
 	KASSERTMSG(prot & VM_PROT_READ,
-	    ("%s: no READ (%#x) in prot %#x", __func__, VM_PROT_READ, prot));
+	    "%s: no READ (%#x) in prot %#x", __func__, VM_PROT_READ, prot);
 
 	struct vm_page * const pg = PHYS_TO_VM_PAGE(pa);
 	struct vm_page_md *mdpg;

Index: src/sys/common/pmap/tlb/pmap_tlb.c
diff -u src/sys/common/pmap/tlb/pmap_tlb.c:1.10 src/sys/common/pmap/tlb/pmap_tlb.c:1.11
--- src/sys/common/pmap/tlb/pmap_tlb.c:1.10	Wed Jun 29 05:53:44 2011
+++ src/sys/common/pmap/tlb/pmap_tlb.c	Tue Sep 27 01:02:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.10 2011/06/29 05:53:44 matt Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.11 2011/09/27 01:02:37 jym Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.10 2011/06/29 05:53:44 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.11 2011/09/27 01:02:37 jym Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -451,8 +451,8 @@ pmap_tlb_shootdown_process(void)
 
 	KASSERT(cpu_intr_p());
 	KASSERTMSG(ci->ci_cpl >= IPL_SCHED,
-	    ("%s: cpl (%d) < IPL_SCHED (%d)",
-	    __func__, ci->ci_cpl, IPL_SCHED));
+	    "%s: cpl (%d) < IPL_SCHED (%d)",
+	    __func__, ci->ci_cpl, IPL_SCHED);
 
 	TLBINFO_LOCK(ti);
 
@@ -816,8 +816,8 @@ pmap_tlb_asid_deactivate(pmap_t pm)
 		struct cpu_info * const ci = curcpu();
 		KASSERT(!cpu_intr_p());
 		KASSERTMSG(pm->pm_onproc & CPUSET_SINGLE(cpu_index(ci)),
-		    ("%s: pmap %p onproc %#x doesn't include cpu %d (%p)",
-		    __func__, pm, pm->pm_onproc, cpu_index(ci), ci));
+		    "%s: pmap %p onproc %#x doesn't include cpu %d (%p)",
+		    __func__, pm, pm->pm_onproc, cpu_index(ci), ci);
 		/*
 		 * The bits in pm_onproc that belong to this TLB can
 		 * be changed while this TLBs lock is not held as long
@@ -871,8 +871,8 @@ pmap_tlb_asid_check(void)
 	kpreempt_disable();
 	const tlb_asid_t asid = tlb_get_asid();
 	KDASSERTMSG(asid == curcpu()->ci_pmap_asid_cur,
-	   ("%s: asid (%#x) != current asid (%#x)",
-	    __func__, asid, curcpu()->ci_pmap_asid_cur));
+	   "%s: asid (%#x) != current asid (%#x)",
+	    __func__, asid, curcpu()->ci_pmap_asid_cur);
 	kpreempt_enable();
 #endif
 }

Index: src/sys/dev/ic/siisata.c
diff -u src/sys/dev/ic/siisata.c:1.14 src/sys/dev/ic/siisata.c:1.15
--- src/sys/dev/ic/siisata.c:1.14	Sun Feb 13 01:21:52 2011
+++ src/sys/dev/ic/siisata.c	Tue Sep 27 01:02:38 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.14 2011/02/13 01:21:52 jakllsch Exp $ */
+/* $NetBSD: siisata.c,v 1.15 2011/09/27 01:02:38 jym Exp $ */
 
 /* from ahcisata_core.c */
 
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.14 2011/02/13 01:21:52 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.15 2011/09/27 01:02:38 jym Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -1185,7 +1185,7 @@ siisata_activate_prb(struct siisata_chan
 	sc = (struct siisata_softc *)schp->ata_channel.ch_atac;
 
 	KASSERTMSG((schp->sch_active_slots & __BIT(slot)) != __BIT(slot),
-	    ("%s: trying to activate active slot %d", SIISATANAME(sc), slot));
+	    "%s: trying to activate active slot %d", SIISATANAME(sc), slot);
 
 	SIISATA_PRB_SYNC(sc, schp, slot, BUS_DMASYNC_PREWRITE);
 	/* keep track of what's going on */
@@ -1207,8 +1207,8 @@ siisata_deactivate_prb(struct siisata_ch
 	sc = (struct siisata_softc *)schp->ata_channel.ch_atac;
 
 	KASSERTMSG((schp->sch_active_slots & __BIT(slot)) != 0,
-	    ("%s: trying to deactivate inactive slot %d", SIISATANAME(sc),
-	    slot));
+	    "%s: trying to deactivate inactive slot %d", SIISATANAME(sc),
+	    slot);
 
 	schp->sch_active_slots &= ~__BIT(slot); /* mark free */
 	SIISATA_PRB_SYNC(sc, schp, slot, BUS_DMASYNC_POSTWRITE);

Index: src/sys/dev/usb/usb_mem.c
diff -u src/sys/dev/usb/usb_mem.c:1.49 src/sys/dev/usb/usb_mem.c:1.50
--- src/sys/dev/usb/usb_mem.c:1.49	Sun Jun 12 03:26:20 2011
+++ src/sys/dev/usb/usb_mem.c	Tue Sep 27 01:02:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_mem.c,v 1.49 2011/06/12 03:26:20 rmind Exp $	*/
+/*	$NetBSD: usb_mem.c,v 1.50 2011/09/27 01:02:38 jym Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.49 2011/06/12 03:26:20 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.50 2011/09/27 01:02:38 jym Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -269,8 +269,8 @@ usb_allocmem(usbd_bus_handle bus, size_t
 	/* Check for free fragments. */
 	LIST_FOREACH(f, &usb_frag_freelist, next) {
 		KDASSERTMSG(usb_valid_block_p(f->block, &usb_blk_fraglist),
-		    ("%s: usb frag %p: unknown block pointer %p",
-		     __func__, f, f->block));
+		    "%s: usb frag %p: unknown block pointer %p",
+		     __func__, f, f->block);
 		if (f->block->tag == tag)
 			break;
 	}
@@ -316,15 +316,15 @@ usb_freemem(usbd_bus_handle bus, usb_dma
 
 	if (p->block->flags & USB_DMA_FULLBLOCK) {
 		KDASSERTMSG(usb_valid_block_p(p->block, &usb_blk_fulllist),
-		    ("%s: dma %p: invalid block pointer %p",
-		     __func__, p, p->block));
+		    "%s: dma %p: invalid block pointer %p",
+		     __func__, p, p->block);
 		DPRINTFN(1, ("usb_freemem: large free\n"));
 		usb_block_freemem(p->block);
 		return;
 	}
 	KDASSERTMSG(usb_valid_block_p(p->block, &usb_blk_fraglist),
-	    ("%s: dma %p: invalid block pointer %p",
-	     __func__, p, p->block));
+	    "%s: dma %p: invalid block pointer %p",
+	     __func__, p, p->block);
 	//usb_syncmem(p, 0, USB_MEM_SMALL, BUS_DMASYNC_POSTREAD);
 	f = KERNADDR(p, 0);
 #ifdef USB_FRAG_DMA_WORKAROUND

Index: src/sys/kern/kern_mutex_obj.c
diff -u src/sys/kern/kern_mutex_obj.c:1.4 src/sys/kern/kern_mutex_obj.c:1.5
--- src/sys/kern/kern_mutex_obj.c:1.4	Sat Jun 11 01:07:33 2011
+++ src/sys/kern/kern_mutex_obj.c	Tue Sep 27 01:02:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_mutex_obj.c,v 1.4 2011/06/11 01:07:33 matt Exp $	*/
+/*	$NetBSD: kern_mutex_obj.c,v 1.5 2011/09/27 01:02:38 jym Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_mutex_obj.c,v 1.4 2011/06/11 01:07:33 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_mutex_obj.c,v 1.5 2011/09/27 01:02:38 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -107,11 +107,11 @@ mutex_obj_hold(kmutex_t *lock)
 	struct kmutexobj *mo = (struct kmutexobj *)lock;
 
 	KASSERTMSG(mo->mo_magic == MUTEX_OBJ_MAGIC,
-	    ("%s: lock %p: mo->mo_magic (%#x) != MUTEX_OBJ_MAGIC (%#x)",
-	     __func__, mo, mo->mo_magic, MUTEX_OBJ_MAGIC));
+	    "%s: lock %p: mo->mo_magic (%#x) != MUTEX_OBJ_MAGIC (%#x)",
+	     __func__, mo, mo->mo_magic, MUTEX_OBJ_MAGIC);
 	KASSERTMSG(mo->mo_refcnt > 0,
-	    ("%s: lock %p: mo->mo_refcnt (%#x) == 0",
-	     __func__, mo, mo->mo_refcnt));
+	    "%s: lock %p: mo->mo_refcnt (%#x) == 0",
+	     __func__, mo, mo->mo_refcnt);
 
 	atomic_inc_uint(&mo->mo_refcnt);
 }
@@ -128,11 +128,11 @@ mutex_obj_free(kmutex_t *lock)
 	struct kmutexobj *mo = (struct kmutexobj *)lock;
 
 	KASSERTMSG(mo->mo_magic == MUTEX_OBJ_MAGIC,
-	    ("%s: lock %p: mo->mo_magic (%#x) != MUTEX_OBJ_MAGIC (%#x)",
-	     __func__, mo, mo->mo_magic, MUTEX_OBJ_MAGIC));
+	    "%s: lock %p: mo->mo_magic (%#x) != MUTEX_OBJ_MAGIC (%#x)",
+	     __func__, mo, mo->mo_magic, MUTEX_OBJ_MAGIC);
 	KASSERTMSG(mo->mo_refcnt > 0,
-	    ("%s: lock %p: mo->mo_refcnt (%#x) == 0",
-	     __func__, mo, mo->mo_refcnt));
+	    "%s: lock %p: mo->mo_refcnt (%#x) == 0",
+	     __func__, mo, mo->mo_refcnt);
 
 	if (atomic_dec_uint_nv(&mo->mo_refcnt) > 0) {
 		return false;

Index: src/sys/kern/kern_softint.c
diff -u src/sys/kern/kern_softint.c:1.37 src/sys/kern/kern_softint.c:1.38
--- src/sys/kern/kern_softint.c:1.37	Sun Jul 31 13:41:30 2011
+++ src/sys/kern/kern_softint.c	Tue Sep 27 01:02:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_softint.c,v 1.37 2011/07/31 13:41:30 uebayasi Exp $	*/
+/*	$NetBSD: kern_softint.c,v 1.38 2011/09/27 01:02:38 jym Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -176,7 +176,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.37 2011/07/31 13:41:30 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.38 2011/09/27 01:02:38 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -543,8 +543,8 @@ softint_execute(softint_t *si, lwp_t *l,
 
 		/* Diagnostic: check that spin-locks have not leaked. */
 		KASSERTMSG(curcpu()->ci_mtx_count == 0,
-		    ("%s: ci_mtx_count (%d) != 0, sh_func %p\n",
-		    __func__, curcpu()->ci_mtx_count, sh->sh_func));
+		    "%s: ci_mtx_count (%d) != 0, sh_func %p\n",
+		    __func__, curcpu()->ci_mtx_count, sh->sh_func);
 	
 		(void)splhigh();
 		KASSERT((sh->sh_flags & SOFTINT_ACTIVE) != 0);

Index: src/sys/kern/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.290 src/sys/kern/kern_synch.c:1.291
--- src/sys/kern/kern_synch.c:1.290	Sat Jul 30 17:01:04 2011
+++ src/sys/kern/kern_synch.c	Tue Sep 27 01:02:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_synch.c,v 1.290 2011/07/30 17:01:04 christos Exp $	*/
+/*	$NetBSD: kern_synch.c,v 1.291 2011/09/27 01:02:38 jym Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.290 2011/07/30 17:01:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.291 2011/09/27 01:02:38 jym Exp $");
 
 #include "opt_kstack.h"
 #include "opt_perfctrs.h"
@@ -743,8 +743,8 @@ mi_switch(lwp_t *l)
 		 * the context switch.
 		 */
 		KASSERTMSG(ci->ci_mtx_count == -1,
-		    ("%s: cpu%u: ci_mtx_count (%d) != -1",
-		     __func__, cpu_index(ci), ci->ci_mtx_count));
+		    "%s: cpu%u: ci_mtx_count (%d) != -1",
+		     __func__, cpu_index(ci), ci->ci_mtx_count);
 		oldspl = MUTEX_SPIN_OLDSPL(ci);
 		ci->ci_mtx_count--;
 		lwp_unlock(l);

Index: src/sys/kern/subr_evcnt.c
diff -u src/sys/kern/subr_evcnt.c:1.10 src/sys/kern/subr_evcnt.c:1.11
--- src/sys/kern/subr_evcnt.c:1.10	Fri Sep 16 01:03:02 2011
+++ src/sys/kern/subr_evcnt.c	Tue Sep 27 01:02:39 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_evcnt.c,v 1.10 2011/09/16 01:03:02 christos Exp $ */
+/* $NetBSD: subr_evcnt.c,v 1.11 2011/09/27 01:02:39 jym Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_evcnt.c,v 1.10 2011/09/16 01:03:02 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_evcnt.c,v 1.11 2011/09/27 01:02:39 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/evcnt.h>
@@ -132,8 +132,8 @@ evcnt_attach_static(struct evcnt *ev)
 	int len;
 
 	KASSERTMSG(init_done,
-	    ("%s: evcnt non initialized: group=<%s> name=<%s>",
-	    __func__, ev->ev_group, ev->ev_name));
+	    "%s: evcnt non initialized: group=<%s> name=<%s>",
+	    __func__, ev->ev_group, ev->ev_name);
 
 	len = strlen(ev->ev_group);
 #ifdef DIAGNOSTIC

Index: src/sys/kern/subr_pcu.c
diff -u src/sys/kern/subr_pcu.c:1.9 src/sys/kern/subr_pcu.c:1.10
--- src/sys/kern/subr_pcu.c:1.9	Mon Jun 13 21:32:42 2011
+++ src/sys/kern/subr_pcu.c	Tue Sep 27 01:02:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pcu.c,v 1.9 2011/06/13 21:32:42 matt Exp $	*/
+/*	$NetBSD: subr_pcu.c,v 1.10 2011/09/27 01:02:39 jym Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.9 2011/06/13 21:32:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcu.c,v 1.10 2011/09/27 01:02:39 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -236,8 +236,8 @@ pcu_lwp_op(const pcu_ops_t *pcu, lwp_t *
 		 * State is on the current CPU - just perform the operations.
 		 */
 		KASSERTMSG(ci->ci_pcu_curlwp[id] == l,
-		    ("%s: cpu%u: pcu_curlwp[%u] (%p) != l (%p)",
-		     __func__, cpu_index(ci), id, ci->ci_pcu_curlwp[id], l));
+		    "%s: cpu%u: pcu_curlwp[%u] (%p) != l (%p)",
+		     __func__, cpu_index(ci), id, ci->ci_pcu_curlwp[id], l);
 		pcu_do_op(pcu, l, flags);
 		splx(s);
 		return;

Index: src/sys/kern/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.189 src/sys/kern/subr_pool.c:1.190
--- src/sys/kern/subr_pool.c:1.189	Tue Mar 22 15:16:23 2011
+++ src/sys/kern/subr_pool.c	Tue Sep 27 01:02:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.189 2011/03/22 15:16:23 pooka Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.190 2011/09/27 01:02:39 jym Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.189 2011/03/22 15:16:23 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.190 2011/09/27 01:02:39 jym Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pool.h"
@@ -2539,8 +2539,8 @@ pool_cache_get_paddr(pool_cache_t pc, in
 
 	KASSERTMSG((!cpu_intr_p() && !cpu_softintr_p()) ||
 	    (pc->pc_pool.pr_ipl != IPL_NONE || cold || panicstr != NULL),
-	    ("pool '%s' is IPL_NONE, but called from interrupt context\n",
-	    pc->pc_pool.pr_wchan));
+	    "pool '%s' is IPL_NONE, but called from interrupt context\n",
+	    pc->pc_pool.pr_wchan);
 
 	if (flags & PR_WAITOK) {
 		ASSERT_SLEEPABLE();

Index: src/sys/lib/libkern/libkern.h
diff -u src/sys/lib/libkern/libkern.h:1.100 src/sys/lib/libkern/libkern.h:1.101
--- src/sys/lib/libkern/libkern.h:1.100	Sun Sep 25 20:31:18 2011
+++ src/sys/lib/libkern/libkern.h	Tue Sep 27 01:02:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: libkern.h,v 1.100 2011/09/25 20:31:18 jym Exp $	*/
+/*	$NetBSD: libkern.h,v 1.101 2011/09/27 01:02:39 jym Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,6 +37,7 @@
 #include <sys/types.h>
 #include <sys/inttypes.h>
 #include <sys/null.h>
+#include <sys/systm.h>
 
 #ifndef LIBKERN_INLINE
 #define LIBKERN_INLINE	static __inline
@@ -174,11 +175,13 @@ tolower(int ch)
 
 #define	__NULL_STMT		do { } while (/* CONSTCOND */ 0)
 
+#define __KASSERTSTR  "kernel %sassertion \"%s\" failed: file \"%s\", line %d "
+
 #ifdef NDEBUG						/* tradition! */
 #define	assert(e)	((void)0)
 #else
 #define	assert(e)	(__predict_true((e)) ? (void)0 :		    \
-			    kern_assert("", __FILE__, __LINE__, #e))
+			    panic(__KASSERTSTR, "", #e, __FILE__, __LINE__))
 #endif
 
 #ifdef __COVERITY__
@@ -192,38 +195,43 @@ tolower(int ch)
 #ifndef DIAGNOSTIC
 #define _DIAGASSERT(a)	(void)0
 #ifdef lint
-#define	KASSERTMSG(e, msg)	/* NOTHING */
+#define	KASSERTMSG(e, msg, ...)	/* NOTHING */
 #define	KASSERT(e)		/* NOTHING */
 #else /* !lint */
-#define	KASSERTMSG(e, msg)	((void)0)
+#define	KASSERTMSG(e, msg, ...)	((void)0)
 #define	KASSERT(e)		((void)0)
 #endif /* !lint */
 #else /* DIAGNOSTIC */
 #define _DIAGASSERT(a)	assert(a)
-#define	KASSERTMSG(e, msg) do {		\
-	if (__predict_false(!(e)))	\
-		panic msg;		\
-	} while (/*CONSTCOND*/ 0)
+#define	KASSERTMSG(e, msg, ...)		\
+			(__predict_true((e)) ? (void)0 :		    \
+			    panic(__KASSERTSTR msg, "diagnostic ", #e,	    \
+				__FILE__, __LINE__, ## __VA_ARGS__))
+
 #define	KASSERT(e)	(__predict_true((e)) ? (void)0 :		    \
-			    kern_assert("diagnostic ", __FILE__, __LINE__, #e))
+			    panic(__KASSERTSTR, "diagnostic ", #e,	    \
+				__FILE__, __LINE__))
 #endif
 
 #ifndef DEBUG
 #ifdef lint
-#define	KDASSERTMSG(e,msg)	/* NOTHING */
+#define	KDASSERTMSG(e,msg, ...)	/* NOTHING */
 #define	KDASSERT(e)		/* NOTHING */
 #else /* lint */
-#define	KDASSERTMSG(e,msg)	((void)0)
+#define	KDASSERTMSG(e,msg, ...)	((void)0)
 #define	KDASSERT(e)		((void)0)
 #endif /* lint */
 #else
-#define	KDASSERTMSG(e, msg) do {	\
-	if (__predict_false(!(e)))	\
-		panic msg;		\
-	} while (/*CONSTCOND*/ 0)
+#define	KDASSERTMSG(e, msg, ...)	\
+			(__predict_true((e)) ? (void)0 :		    \
+			    panic(__KASSERTSTR msg, "debugging ", #e,	    \
+				__FILE__, __LINE__, ## __VA_ARGS__))
+
 #define	KDASSERT(e)	(__predict_true((e)) ? (void)0 :		    \
-			    kern_assert("debugging ", __FILE__, __LINE__, #e))
+			    panic(__KASSERTSTR, "debugging ", #e,	    \
+				__FILE__, __LINE__))
 #endif
+
 /*
  * XXX: For compatibility we use SMALL_RANDOM by default.
  */

Index: src/sys/uvm/uvm_bio.c
diff -u src/sys/uvm/uvm_bio.c:1.78 src/sys/uvm/uvm_bio.c:1.79
--- src/sys/uvm/uvm_bio.c:1.78	Wed Jun 29 19:51:12 2011
+++ src/sys/uvm/uvm_bio.c	Tue Sep 27 01:02:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_bio.c,v 1.78 2011/06/29 19:51:12 hannken Exp $	*/
+/*	$NetBSD: uvm_bio.c,v 1.79 2011/09/27 01:02:39 jym Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.78 2011/06/29 19:51:12 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.79 2011/09/27 01:02:39 jym Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_ubc.h"
@@ -540,8 +540,7 @@ again:
 
 	if (flags & UBC_WRITE) {
 		KASSERTMSG(umap->writeoff == 0 && umap->writelen == 0,
-		    ("ubc_alloc: concurrent writes to uobj %p", uobj)
-		);
+		    "ubc_alloc: concurrent writes to uobj %p", uobj);
 		umap->writeoff = slot_offset;
 		umap->writelen = *lenp;
 	}

Index: src/sys/uvm/uvm_map.c
diff -u src/sys/uvm/uvm_map.c:1.304 src/sys/uvm/uvm_map.c:1.305
--- src/sys/uvm/uvm_map.c:1.304	Thu Sep  1 06:40:28 2011
+++ src/sys/uvm/uvm_map.c	Tue Sep 27 01:02:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.304 2011/09/01 06:40:28 matt Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.305 2011/09/27 01:02:39 jym Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.304 2011/09/01 06:40:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.305 2011/09/27 01:02:39 jym Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -435,8 +435,7 @@ uvm_rb_insert(struct vm_map *map, struct
 
 	ret = rb_tree_insert_node(&map->rb_tree, entry);
 	KASSERTMSG(ret == entry,
-	    ("uvm_rb_insert: map %p: duplicate entry %p", map, ret)
-	);
+	    "uvm_rb_insert: map %p: duplicate entry %p", map, ret);
 
 	/*
 	 * If the previous entry is not our immediate left child, then it's an

Index: src/sys/uvm/uvm_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.61 src/sys/uvm/uvm_pglist.c:1.62
--- src/sys/uvm/uvm_pglist.c:1.61	Sat Apr 23 18:14:13 2011
+++ src/sys/uvm/uvm_pglist.c	Tue Sep 27 01:02:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.61 2011/04/23 18:14:13 rmind Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.62 2011/09/27 01:02:39 jym Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.61 2011/04/23 18:14:13 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.62 2011/09/27 01:02:39 jym Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -289,10 +289,10 @@ uvm_pglistalloc_c_ps(struct vm_physseg *
 	 */
 	ps->start_hint = try + num - ps->avail_start;
 	KASSERTMSG(ps->start_hint <= ps->avail_end - ps->avail_start,
-	    ("%x %u (%#x) <= %#"PRIxPADDR" - %#"PRIxPADDR" (%#"PRIxPADDR")",
+	    "%x %u (%#x) <= %#"PRIxPADDR" - %#"PRIxPADDR" (%#"PRIxPADDR")",
 	    try + num,
 	    ps->start_hint, ps->start_hint, ps->avail_end, ps->avail_start,
-	    ps->avail_end - ps->avail_start));
+	    ps->avail_end - ps->avail_start);
 
 #ifdef PGALLOC_VERBOSE
 	printf("got %d pgs\n", num);
@@ -406,11 +406,11 @@ again:
 			int cidx = 0;
 			const int bank = vm_physseg_find(try, &cidx);
 			KDASSERTMSG(bank == ps - vm_physmem,
-			    ("vm_physseg_find(%#x) (%d) != ps %zd",
-			     try, bank, ps - vm_physmem));
+			    "vm_physseg_find(%#x) (%d) != ps %zd",
+			     try, bank, ps - vm_physmem);
 			KDASSERTMSG(cidx == try - ps->start,
-			    ("vm_physseg_find(%#x): %#x != off %"PRIxPADDR,
-			     try, cidx, try - ps->start));
+			    "vm_physseg_find(%#x): %#x != off %"PRIxPADDR,
+			     try, cidx, try - ps->start);
 		}
 #endif
 		if (VM_PAGE_IS_FREE(pg) == 0)
@@ -428,10 +428,10 @@ again:
 	 */
 	ps->start_hint = try + 1 - ps->avail_start;
 	KASSERTMSG(ps->start_hint <= ps->avail_end - ps->avail_start,
-	    ("%#x %u (%#x) <= %#"PRIxPADDR" - %#"PRIxPADDR" (%#"PRIxPADDR")",
+	    "%#x %u (%#x) <= %#"PRIxPADDR" - %#"PRIxPADDR" (%#"PRIxPADDR")",
 	    try + 1,
 	    ps->start_hint, ps->start_hint, ps->avail_end, ps->avail_start,
-	    ps->avail_end - ps->avail_start));
+	    ps->avail_end - ps->avail_start);
 
 #ifdef PGALLOC_VERBOSE
 	printf("got %d pgs\n", num - todo);

Reply via email to