Module Name:    src
Committed By:   matt
Date:           Fri Mar 28 21:44:35 UTC 2014

Modified Files:
        src/sys/arch/arm/arm: undefined.c

Log Message:
Move undefined evcnt's to cpu_info.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/arm/undefined.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/arm/arm/undefined.c
diff -u src/sys/arch/arm/arm/undefined.c:1.53 src/sys/arch/arm/arm/undefined.c:1.54
--- src/sys/arch/arm/arm/undefined.c:1.53	Sat Mar 15 05:58:30 2014
+++ src/sys/arch/arm/arm/undefined.c	Fri Mar 28 21:44:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: undefined.c,v 1.53 2014/03/15 05:58:30 ozaki-r Exp $	*/
+/*	$NetBSD: undefined.c,v 1.54 2014/03/28 21:44:35 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Ben Harris.
@@ -55,7 +55,7 @@
 #include <sys/kgdb.h>
 #endif
 
-__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.53 2014/03/15 05:58:30 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.54 2014/03/28 21:44:35 matt Exp $");
 
 #include <sys/kmem.h>
 #include <sys/queue.h>
@@ -124,10 +124,6 @@ remove_coproc_handler(void *cookie)
 	kmem_free(uh, sizeof(*uh));
 }
 
-static struct evcnt cp15_ev =
-    EVCNT_INITIALIZER(EVCNT_TYPE_TRAP, NULL, "cpu0", "undefined cp15 insn traps");
-EVCNT_ATTACH_STATIC(cp15_ev);
-
 static int
 cp15_trapper(u_int addr, u_int insn, struct trapframe *tf, int code)
 {
@@ -158,7 +154,7 @@ cp15_trapper(u_int addr, u_int insn, str
 	if ((insn & 0xffff0fff) == 0xee1d0f70) {
 		*regp = (uintptr_t)l->l_private;
 		tf->tf_pc += INSN_SIZE;
-		cp15_ev.ev_count++;
+		curcpu()->ci_und_cp15_ev.ev_count++;
 		return 0;
 	}
 
@@ -172,7 +168,7 @@ cp15_trapper(u_int addr, u_int insn, str
 		else
 			pcb->pcb_user_pid_rw = *regp;
 		tf->tf_pc += INSN_SIZE;
-		cp15_ev.ev_count++;
+		curcpu()->ci_und_cp15_ev.ev_count++;
 		return 0;
 	}
 
@@ -282,10 +278,6 @@ undefined_init(void)
 #endif
 }
 
-static struct evcnt und_ev =
-    EVCNT_INITIALIZER(EVCNT_TYPE_TRAP, NULL, "cpu0", "undefined insn traps");
-EVCNT_ATTACH_STATIC(und_ev);
-
 void
 undefinedinstruction(trapframe_t *tf)
 {
@@ -300,7 +292,7 @@ undefinedinstruction(trapframe_t *tf)
 	int s;
 #endif
 
-	und_ev.ev_count++;
+	curcpu()->ci_und_ev.ev_count++;
 
 #ifdef KDTRACE_HOOKS
 	if ((tf->tf_spsr & PSR_MODE) != PSR_USR32_MODE) {

Reply via email to