Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/at91 attach event counters later, at attach tim...



details:   https://anonhg.NetBSD.org/src/rev/62be42cd1228
branches:  trunk
changeset: 770966:62be42cd1228
user:      aymeric <aymeric%NetBSD.org@localhost>
date:      Fri Nov 04 17:16:38 2011 +0000

description:
attach event counters later, at attach time. Caught by an assertion

diffstat:

 sys/arch/arm/at91/at91aic.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r e4f9714c727a -r 62be42cd1228 sys/arch/arm/at91/at91aic.c
--- a/sys/arch/arm/at91/at91aic.c       Fri Nov 04 17:13:15 2011 +0000
+++ b/sys/arch/arm/at91/at91aic.c       Fri Nov 04 17:16:38 2011 +0000
@@ -1,5 +1,5 @@
-/*     $Id: at91aic.c,v 1.7 2011/07/01 19:31:16 dyoung Exp $   */
-/*     $NetBSD: at91aic.c,v 1.7 2011/07/01 19:31:16 dyoung Exp $       */
+/*     $Id: at91aic.c,v 1.8 2011/11/04 17:16:38 aymeric Exp $  */
+/*     $NetBSD: at91aic.c,v 1.8 2011/11/04 17:16:38 aymeric Exp $      */
 
 /*
  * Copyright (c) 2007 Embedtronics Oy.
@@ -89,7 +89,13 @@
 static void
 at91aic_attach(device_t parent, device_t self, void *aux)
 {
+       int i;
+
        (void)parent; (void)self; (void)aux;
+       for (i = 0; i < NIRQ; i++) {
+               evcnt_attach_dynamic(&intrq[i].iq_ev, EVCNT_TYPE_INTR,
+                                    NULL, "aic", intrq[i].iq_name);
+       }
        printf("\n");
 }
 
@@ -246,8 +252,6 @@
                TAILQ_INIT(&iq->iq_list);
 
                sprintf(iq->iq_name, "irq %d", i);
-               evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
-                                    NULL, "aic", iq->iq_name);
        }
 
        /* All interrupts should use IRQ not FIQ */



Home | Main Index | Thread Index | Old Index