diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2013-09-06 21:40:29 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2013-09-06 21:40:29 +0000 |
commit | 07b3f906f389f2a2daca55d5c7834322d5b714e7 (patch) | |
tree | 9add506de28591ca3de763555741162747ec3cbe /sys/arch/arm | |
parent | cbccf2bd320a00fd2d28064002c74254167e613c (diff) |
Instead of printing on spurious interrupts, use an event counter to show
how many of those there have been.
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/cortex/ampintc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/arm/cortex/ampintc.c b/sys/arch/arm/cortex/ampintc.c index 275a979fbd9..538728eb1ef 100644 --- a/sys/arch/arm/cortex/ampintc.c +++ b/sys/arch/arm/cortex/ampintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ampintc.c,v 1.1 2013/05/01 00:16:26 patrick Exp $ */ +/* $OpenBSD: ampintc.c,v 1.2 2013/09/06 21:40:28 patrick Exp $ */ /* * Copyright (c) 2007,2009,2011 Dale Rahn <drahn@openbsd.org> * @@ -137,6 +137,7 @@ struct ampintc_softc { int sc_nintr; bus_space_tag_t sc_iot; bus_space_handle_t sc_d_ioh, sc_p_ioh; + struct evcount sc_spur; }; struct ampintc_softc *ampintc; @@ -221,6 +222,8 @@ ampintc_attach(struct device *parent, struct device *self, void *args) sc->sc_d_ioh = d_ioh; sc->sc_p_ioh = p_ioh; + evcount_attach(&sc->sc_spur, "irq1023/spur", NULL); + nintr = 32 * (bus_space_read_4(iot, d_ioh, ICD_ICTR) & ICD_ICTR_ITL_M); nintr += 32; /* ICD_ICTR + 1, irq 0-31 is SGI, 32+ is PPI */ sc->sc_nintr = nintr; @@ -478,7 +481,7 @@ ampintc_irq_handler(void *frame) #endif if (iack_val == 1023) { - printf("spur\n"); + sc->sc_spur.ec_count++; return; } irq = iack_val & ((1 << sc->sc_nintr) - 1); |