Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/arm Move undefined evcnt's to cpu_info.



details:   https://anonhg.NetBSD.org/src/rev/232996d81448
branches:  trunk
changeset: 794913:232996d81448
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Mar 28 21:44:35 2014 +0000

description:
Move undefined evcnt's to cpu_info.

diffstat:

 sys/arch/arm/arm/undefined.c |  18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)

diffs (67 lines):

diff -r cbb364a5c312 -r 232996d81448 sys/arch/arm/arm/undefined.c
--- a/sys/arch/arm/arm/undefined.c      Fri Mar 28 21:43:49 2014 +0000
+++ b/sys/arch/arm/arm/undefined.c      Fri Mar 28 21:44:35 2014 +0000
@@ -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 @@
        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 @@
        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 @@
                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 @@
 #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 @@
        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) {



Home | Main Index | Thread Index | Old Index