Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbmips/ingenic add an event counter for clock inte...
details: https://anonhg.NetBSD.org/src/rev/24615fbd28a3
branches: trunk
changeset: 806839:24615fbd28a3
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Mar 11 12:40:36 2015 +0000
description:
add an event counter for clock interrupts
diffstat:
sys/arch/evbmips/ingenic/intr.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r aef074d0edf0 -r 24615fbd28a3 sys/arch/evbmips/ingenic/intr.c
--- a/sys/arch/evbmips/ingenic/intr.c Wed Mar 11 09:57:35 2015 +0000
+++ b/sys/arch/evbmips/ingenic/intr.c Wed Mar 11 12:40:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.6 2015/03/07 15:37:46 macallan Exp $ */
+/* $NetBSD: intr.c,v 1.7 2015/03/11 12:40:36 macallan Exp $ */
/*-
* Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.6 2015/03/07 15:37:46 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.7 2015/03/11 12:40:36 macallan Exp $");
#define __INTR_PRIVATE
@@ -89,6 +89,7 @@
};
struct intrhand intrs[NINTR];
+struct evcnt clockintrs;
void ingenic_irq(int);
@@ -100,6 +101,9 @@
ipl_sr_map = ingenic_ipl_sr_map;
+ evcnt_attach_dynamic(&clockintrs,
+ EVCNT_TYPE_INTR, NULL, "timer", "intr");
+
/* zero all handlers */
for (i = 0; i < NINTR; i++) {
intrs[i].ih_func = NULL;
@@ -181,6 +185,7 @@
if (ipending & MIPS_INT_MASK_2) {
/* this is a timer interrupt */
ingenic_clockintr(id);
+ clockintrs.ev_count++;
ingenic_puts("INT2\n");
}
if (ipending & MIPS_INT_MASK_0) {
@@ -202,6 +207,7 @@
writereg(JZ_ICMSR0, mask);
ingenic_clockintr(id);
writereg(JZ_ICMCR0, mask);
+ clockintrs.ev_count++;
}
ingenic_irq(ipl);
KASSERT(id == 0);
Home |
Main Index |
Thread Index |
Old Index