Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex Don't bother dealing with "extra" ticks, ...
details: https://anonhg.NetBSD.org/src/rev/ccdf66701b19
branches: trunk
changeset: 781734:ccdf66701b19
user: matt <matt%NetBSD.org@localhost>
date: Thu Sep 27 00:23:27 2012 +0000
description:
Don't bother dealing with "extra" ticks, just count them.
diffstat:
sys/arch/arm/cortex/a9tmr.c | 12 ++++++++++--
sys/arch/arm/cortex/a9tmr_var.h | 3 ++-
2 files changed, 12 insertions(+), 3 deletions(-)
diffs (64 lines):
diff -r f76f87a426cf -r ccdf66701b19 sys/arch/arm/cortex/a9tmr.c
--- a/sys/arch/arm/cortex/a9tmr.c Thu Sep 27 00:22:39 2012 +0000
+++ b/sys/arch/arm/cortex/a9tmr.c Thu Sep 27 00:23:27 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: a9tmr.c,v 1.2 2012/09/14 03:52:19 matt Exp $ */
+/* $NetBSD: a9tmr.c,v 1.3 2012/09/27 00:23:27 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.2 2012/09/14 03:52:19 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.3 2012/09/27 00:23:27 matt Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -134,6 +134,9 @@
sc->sc_memt = mpcaa->mpcaa_memt;
sc->sc_memh = mpcaa->mpcaa_memh;
+ evcnt_attach_dynamic(&sc->sc_ev_missing_ticks, EVCNT_TYPE_MISC, NULL,
+ device_xname(self), "missing interrupts");
+
bus_space_subregion(sc->sc_memt, sc->sc_memh,
TMR_GLOBAL_BASE, TMR_GLOBAL_BASE, &sc->sc_global_memh);
bus_space_subregion(sc->sc_memt, sc->sc_memh,
@@ -298,6 +301,7 @@
hardclock(cf);
+#if 0
/*
* Try to make up up to a seconds amount of missed clock interrupts
*/
@@ -307,6 +311,10 @@
delta -= sc->sc_autoinc, ticks--) {
hardclock(cf);
}
+#else
+ if (delta > sc->sc_autoinc)
+ sc->sc_ev_missing_ticks.ev_count += delta / sc->sc_autoinc;
+#endif
return 1;
}
diff -r f76f87a426cf -r ccdf66701b19 sys/arch/arm/cortex/a9tmr_var.h
--- a/sys/arch/arm/cortex/a9tmr_var.h Thu Sep 27 00:22:39 2012 +0000
+++ b/sys/arch/arm/cortex/a9tmr_var.h Thu Sep 27 00:23:27 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: a9tmr_var.h,v 1.1 2012/09/01 00:03:14 matt Exp $ */
+/* $NetBSD: a9tmr_var.h,v 1.2 2012/09/27 00:23:27 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -38,6 +38,7 @@
bus_space_handle_t sc_global_memh;
bus_space_handle_t sc_private_memh;
bus_space_handle_t sc_wdog_memh;
+ struct evcnt sc_ev_missing_ticks;
u_long sc_freq;
u_long sc_autoinc;
void *sc_global_ih;
Home |
Main Index |
Thread Index |
Old Index