Module Name: src
Committed By: chs
Date: Wed Oct 3 16:51:44 UTC 2012
Modified Files:
src/sys/arch/evbarm/iq80310: i80312_mainbus.c iq80310_intr.c
iq80310var.h
Log Message:
defer evcnt attachment correctly.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/iq80310/i80312_mainbus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/iq80310/iq80310_intr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/iq80310/iq80310var.h
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/evbarm/iq80310/i80312_mainbus.c
diff -u src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.14 src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.15
--- src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.14 Fri Jul 1 20:41:16 2011
+++ src/sys/arch/evbarm/iq80310/i80312_mainbus.c Wed Oct 3 16:51:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: i80312_mainbus.c,v 1.14 2011/07/01 20:41:16 dyoung Exp $ */
+/* $NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i80312_mainbus.c,v 1.14 2011/07/01 20:41:16 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,6 +98,7 @@ i80312_mainbus_attach(struct device *par
psize_t memsize;
i80312_mainbus_found = 1;
+ iq80310_intr_evcnt_attach();
/*
* Fill in the space tag for the i80312's own devices,
Index: src/sys/arch/evbarm/iq80310/iq80310_intr.c
diff -u src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31 src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.32
--- src/sys/arch/evbarm/iq80310/iq80310_intr.c:1.31 Tue Aug 14 15:46:21 2012
+++ src/sys/arch/evbarm/iq80310/iq80310_intr.c Wed Oct 3 16:51:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $ */
+/* $NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iq80310_intr.c,v 1.31 2012/08/14 15:46:21 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iq80310_intr.c,v 1.32 2012/10/03 16:51:44 chs Exp $");
#ifndef EVBARM_SPL_NOINLINE
#define EVBARM_SPL_NOINLINE
@@ -350,6 +350,19 @@ iq80310_intr_init(void)
enable_interrupts(I32_bit);
}
+void
+iq80310_intr_evcnt_attach(void)
+{
+ struct intrq *iq;
+ int i;
+
+ for (i = 0; i < NIRQ; i++) {
+ iq = &intrq[i];
+ evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
+ NULL, "iq80310", iq->iq_name);
+ }
+}
+
void *
iq80310_intr_establish(int irq, int ipl, int (*func)(void *), void *arg)
{
@@ -377,8 +390,6 @@ iq80310_intr_establish(int irq, int ipl,
oldirqstate = disable_interrupts(I32_bit);
TAILQ_INSERT_TAIL(&iq->iq_list, ih, ih_list);
- evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
- NULL, "iq80310", iq->iq_name);
iq80310_intr_calculate_masks();
Index: src/sys/arch/evbarm/iq80310/iq80310var.h
diff -u src/sys/arch/evbarm/iq80310/iq80310var.h:1.7 src/sys/arch/evbarm/iq80310/iq80310var.h:1.8
--- src/sys/arch/evbarm/iq80310/iq80310var.h:1.7 Tue Oct 8 17:39:17 2002
+++ src/sys/arch/evbarm/iq80310/iq80310var.h Wed Oct 3 16:51:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: iq80310var.h,v 1.7 2002/10/08 17:39:17 thorpej Exp $ */
+/* $NetBSD: iq80310var.h,v 1.8 2012/10/03 16:51:44 chs Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -94,6 +94,7 @@ void iq80310_7seg_snake(void);
void iq80310_pci_init(pci_chipset_tag_t, void *);
void iq80310_intr_init(void);
+void iq80310_intr_evcnt_attach(void);
void *iq80310_intr_establish(int, int, int (*)(void *), void *);
void iq80310_intr_disestablish(void *);