Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Defer intr evcnt_attach to cpu_configure



details:   https://anonhg.NetBSD.org/src/rev/d320737d27c4
branches:  trunk
changeset: 328392:d320737d27c4
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Apr 02 11:35:36 2014 +0000

description:
Defer intr evcnt_attach to cpu_configure

diffstat:

 sys/arch/arm/footbridge/footbridge_irqhandler.c |  22 ++++++++++++++++------
 sys/arch/arm/footbridge/footbridge_irqhandler.h |   3 ++-
 sys/arch/cats/cats/autoconf.c                   |   5 +++--
 3 files changed, 21 insertions(+), 9 deletions(-)

diffs (93 lines):

diff -r 416f2aed041d -r d320737d27c4 sys/arch/arm/footbridge/footbridge_irqhandler.c
--- a/sys/arch/arm/footbridge/footbridge_irqhandler.c   Wed Apr 02 10:55:47 2014 +0000
+++ b/sys/arch/arm/footbridge/footbridge_irqhandler.c   Wed Apr 02 11:35:36 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: footbridge_irqhandler.c,v 1.24 2014/03/26 08:51:59 christos Exp $      */
+/*     $NetBSD: footbridge_irqhandler.c,v 1.25 2014/04/02 11:35:36 matt Exp $  */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0,"$NetBSD: footbridge_irqhandler.c,v 1.24 2014/03/26 08:51:59 christos Exp $");
+__KERNEL_RCSID(0,"$NetBSD: footbridge_irqhandler.c,v 1.25 2014/04/02 11:35:36 matt Exp $");
 
 #include "opt_irqstats.h"
 
@@ -195,10 +195,6 @@
        
        for (i = 0, iq = footbridge_intrq; i < NIRQ; i++, iq++) {
                TAILQ_INIT(&iq->iq_list);
-
-               snprintf(iq->iq_name, sizeof(iq->iq_name), "irq %d", i);
-               evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
-                   NULL, "footbridge", iq->iq_name);
        }
        
        footbridge_intr_calculate_masks();
@@ -207,6 +203,20 @@
        enable_interrupts(I32_bit);
 }
 
+void
+footbridge_intr_evcnt_attach(void)
+{
+       struct intrq *iq;
+       int i;
+
+       for (i = 0, iq = footbridge_intrq; i < NIRQ; i++, iq++) {
+
+               snprintf(iq->iq_name, sizeof(iq->iq_name), "irq %d", i);
+               evcnt_attach_dynamic(&iq->iq_ev, EVCNT_TYPE_INTR,
+                   NULL, "footbridge", iq->iq_name);
+       }
+}
+
 void *
 footbridge_intr_claim(int irq, int ipl, const char *name, int (*func)(void *), void *arg)
 {
diff -r 416f2aed041d -r d320737d27c4 sys/arch/arm/footbridge/footbridge_irqhandler.h
--- a/sys/arch/arm/footbridge/footbridge_irqhandler.h   Wed Apr 02 10:55:47 2014 +0000
+++ b/sys/arch/arm/footbridge/footbridge_irqhandler.h   Wed Apr 02 11:35:36 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: footbridge_irqhandler.h,v 1.5 2005/12/11 12:16:45 christos Exp $       */
+/*     $NetBSD: footbridge_irqhandler.h,v 1.6 2014/04/02 11:35:36 matt Exp $   */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -51,6 +51,7 @@
 #ifdef _KERNEL
 void *footbridge_intr_claim(int irq, int ipl, const char *name, int (*func)(void *), void *arg);
 void footbridge_intr_init(void);
+void footbridge_intr_evcnt_attach(void);
 void footbridge_intr_disestablish(void *cookie);
 #endif /* _KERNEL */
 
diff -r 416f2aed041d -r d320737d27c4 sys/arch/cats/cats/autoconf.c
--- a/sys/arch/cats/cats/autoconf.c     Wed Apr 02 10:55:47 2014 +0000
+++ b/sys/arch/cats/cats/autoconf.c     Wed Apr 02 11:35:36 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.18 2012/10/27 17:17:43 chs Exp $        */
+/*     $NetBSD: autoconf.c,v 1.19 2014/04/02 11:35:36 matt Exp $       */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2012/10/27 17:17:43 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.19 2014/04/02 11:35:36 matt Exp $");
 
 #include "opt_md.h"
 
@@ -136,6 +136,7 @@
 void
 cpu_configure(void)
 {
+       footbridge_intr_evcnt_attach();
        /*
         * Since various PCI interrupts could be routed via the ICU
         * (for PCI devices in the bridge) we need to set up the ICU



Home | Main Index | Thread Index | Old Index