Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/iq80310 defer evcnt attachment correctly.
details: https://anonhg.NetBSD.org/src/rev/5ea1036efec0
branches: trunk
changeset: 781835:5ea1036efec0
user: chs <chs%NetBSD.org@localhost>
date: Wed Oct 03 16:51:44 2012 +0000
description:
defer evcnt attachment correctly.
diffstat:
sys/arch/evbarm/iq80310/i80312_mainbus.c | 5 +++--
sys/arch/evbarm/iq80310/iq80310_intr.c | 19 +++++++++++++++----
sys/arch/evbarm/iq80310/iq80310var.h | 3 ++-
3 files changed, 20 insertions(+), 7 deletions(-)
diffs (90 lines):
diff -r e41dac824d43 -r 5ea1036efec0 sys/arch/evbarm/iq80310/i80312_mainbus.c
--- a/sys/arch/evbarm/iq80310/i80312_mainbus.c Wed Oct 03 13:13:38 2012 +0000
+++ b/sys/arch/evbarm/iq80310/i80312_mainbus.c Wed Oct 03 16:51:44 2012 +0000
@@ -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 @@
psize_t memsize;
i80312_mainbus_found = 1;
+ iq80310_intr_evcnt_attach();
/*
* Fill in the space tag for the i80312's own devices,
diff -r e41dac824d43 -r 5ea1036efec0 sys/arch/evbarm/iq80310/iq80310_intr.c
--- a/sys/arch/evbarm/iq80310/iq80310_intr.c Wed Oct 03 13:13:38 2012 +0000
+++ b/sys/arch/evbarm/iq80310/iq80310_intr.c Wed Oct 03 16:51:44 2012 +0000
@@ -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 @@
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 @@
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();
diff -r e41dac824d43 -r 5ea1036efec0 sys/arch/evbarm/iq80310/iq80310var.h
--- a/sys/arch/evbarm/iq80310/iq80310var.h Wed Oct 03 13:13:38 2012 +0000
+++ b/sys/arch/evbarm/iq80310/iq80310var.h Wed Oct 03 16:51:44 2012 +0000
@@ -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_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 *);
Home |
Main Index |
Thread Index |
Old Index