Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Defer attaching interrupt evcnts in the same way as...
details: https://anonhg.NetBSD.org/src/rev/d5a4ff5356ec
branches: trunk
changeset: 781765:d5a4ff5356ec
user: ryo <ryo%NetBSD.org@localhost>
date: Fri Sep 28 20:08:13 2012 +0000
description:
Defer attaching interrupt evcnts in the same way as i80321.c by matt@
diffstat:
sys/arch/arm/xscale/ixp425_intr.c | 19 +++++++++++++++----
sys/arch/arm/xscale/ixp425var.h | 3 ++-
sys/arch/evbarm/ixdp425/ixdp425_mainbus.c | 5 +++--
sys/arch/evbarm/nslu2/nslu2_mainbus.c | 5 +++--
4 files changed, 23 insertions(+), 9 deletions(-)
diffs (115 lines):
diff -r 0d65cbc00da2 -r d5a4ff5356ec sys/arch/arm/xscale/ixp425_intr.c
--- a/sys/arch/arm/xscale/ixp425_intr.c Fri Sep 28 18:36:02 2012 +0000
+++ b/sys/arch/arm/xscale/ixp425_intr.c Fri Sep 28 20:08:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp425_intr.c,v 1.23 2011/07/01 20:32:51 dyoung Exp $ */
+/* $NetBSD: ixp425_intr.c,v 1.24 2012/09/28 20:08:13 ryo Exp $ */
/*
* Copyright (c) 2003
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixp425_intr.c,v 1.23 2011/07/01 20:32:51 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp425_intr.c,v 1.24 2012/09/28 20:08:13 ryo Exp $");
#ifndef EVBARM_SPL_NOINLINE
#define EVBARM_SPL_NOINLINE
@@ -308,8 +308,6 @@
TAILQ_INIT(&iq->iq_list);
sprintf(iq->iq_name, "irq %d", i);
- evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
- NULL, "ixp425", iq->iq_name);
}
ixp425_intr_calculate_masks();
@@ -318,6 +316,19 @@
enable_interrupts(I32_bit);
}
+void
+ixp425_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, "ixp425", iq->iq_name);
+ }
+}
+
void *
ixp425_intr_establish(int irq, int ipl, int (*func)(void *), void *arg)
{
diff -r 0d65cbc00da2 -r d5a4ff5356ec sys/arch/arm/xscale/ixp425var.h
--- a/sys/arch/arm/xscale/ixp425var.h Fri Sep 28 18:36:02 2012 +0000
+++ b/sys/arch/arm/xscale/ixp425var.h Fri Sep 28 20:08:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp425var.h,v 1.13 2011/07/01 20:32:51 dyoung Exp $ */
+/* $NetBSD: ixp425var.h,v 1.14 2012/09/28 20:08:13 ryo Exp $ */
/*
* Copyright (c) 2003
@@ -146,6 +146,7 @@
void ixp425_icu_init(void);
void ixp425_clk_bootstrap(bus_space_tag_t);
void ixp425_intr_init(void);
+void ixp425_intr_evcnt_attach(void);
void *ixp425_intr_establish(int, int, int (*)(void *), void *);
void ixp425_intr_disestablish(void *);
diff -r 0d65cbc00da2 -r d5a4ff5356ec sys/arch/evbarm/ixdp425/ixdp425_mainbus.c
--- a/sys/arch/evbarm/ixdp425/ixdp425_mainbus.c Fri Sep 28 18:36:02 2012 +0000
+++ b/sys/arch/evbarm/ixdp425/ixdp425_mainbus.c Fri Sep 28 20:08:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixdp425_mainbus.c,v 1.7 2011/07/01 20:42:36 dyoung Exp $ */
+/* $NetBSD: ixdp425_mainbus.c,v 1.8 2012/09/28 20:08:13 ryo Exp $ */
/*
* Copyright (c) 2003
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixdp425_mainbus.c,v 1.7 2011/07/01 20:42:36 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixdp425_mainbus.c,v 1.8 2012/09/28 20:08:13 ryo Exp $");
/*
* front-end for the ixp425 NetworkProcessor.
@@ -65,5 +65,6 @@
{
struct ixp425_softc *sc = (void *) self;
+ ixp425_intr_evcnt_attach();
ixp425_attach(sc);
}
diff -r 0d65cbc00da2 -r d5a4ff5356ec sys/arch/evbarm/nslu2/nslu2_mainbus.c
--- a/sys/arch/evbarm/nslu2/nslu2_mainbus.c Fri Sep 28 18:36:02 2012 +0000
+++ b/sys/arch/evbarm/nslu2/nslu2_mainbus.c Fri Sep 28 20:08:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nslu2_mainbus.c,v 1.2 2008/04/28 20:23:17 martin Exp $ */
+/* $NetBSD: nslu2_mainbus.c,v 1.3 2012/09/28 20:08:13 ryo Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nslu2_mainbus.c,v 1.2 2008/04/28 20:23:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslu2_mainbus.c,v 1.3 2012/09/28 20:08:13 ryo Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,6 +52,7 @@
ixp425_mainbus_attach(struct device *parent, struct device *self, void *arg)
{
+ ixp425_intr_evcnt_attach();
ixp425_attach((struct ixp425_softc *) self);
}
Home |
Main Index |
Thread Index |
Old Index