Module Name: src
Committed By: aymeric
Date: Fri Nov 4 17:16:38 UTC 2011
Modified Files:
src/sys/arch/arm/at91: at91aic.c
Log Message:
attach event counters later, at attach time. Caught by an assertion
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/at91/at91aic.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/at91/at91aic.c
diff -u src/sys/arch/arm/at91/at91aic.c:1.7 src/sys/arch/arm/at91/at91aic.c:1.8
--- src/sys/arch/arm/at91/at91aic.c:1.7 Fri Jul 1 19:31:16 2011
+++ src/sys/arch/arm/at91/at91aic.c Fri Nov 4 17:16:38 2011
@@ -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 @@ at91aic_match(device_t parent, cfdata_t
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 @@ at91aic_init(void)
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 */