Source-Changes-HG archive

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

[src/netbsd-10]: src/sys/arch Pull up following revision(s) (requested by jmc...



details:   https://anonhg.NetBSD.org/src/rev/debd85eb6926
branches:  netbsd-10
changeset: 374555:debd85eb6926
user:      martin <martin%NetBSD.org@localhost>
date:      Tue May 02 17:52:39 2023 +0000

description:
Pull up following revision(s) (requested by jmcneill in ticket #155):

        sys/arch/arm/ep93xx/ep93xx_intr.c: revision 1.28
        sys/arch/arm/ep93xx/ep93xxvar.h: revision 1.7
        sys/arch/evbarm/tsarm/tsarm_machdep.c: revision 1.36

TS7200: Defer event counter registration until after evcnt is initialized

Patch from Lloyd Parkes in PR kern/57386

diffstat:

 sys/arch/arm/ep93xx/ep93xx_intr.c     |  21 ++++++++++++++++-----
 sys/arch/arm/ep93xx/ep93xxvar.h       |   3 ++-
 sys/arch/evbarm/tsarm/tsarm_machdep.c |  10 ++++++++--
 3 files changed, 26 insertions(+), 8 deletions(-)

diffs (94 lines):

diff -r 27eae7c59d33 -r debd85eb6926 sys/arch/arm/ep93xx/ep93xx_intr.c
--- a/sys/arch/arm/ep93xx/ep93xx_intr.c Tue May 02 17:39:54 2023 +0000
+++ b/sys/arch/arm/ep93xx/ep93xx_intr.c Tue May 02 17:52:39 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ep93xx_intr.c,v 1.27 2021/11/21 08:25:26 skrll Exp $ */
+/* $NetBSD: ep93xx_intr.c,v 1.27.4.1 2023/05/02 17:52:39 martin Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ep93xx_intr.c,v 1.27 2021/11/21 08:25:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ep93xx_intr.c,v 1.27.4.1 2023/05/02 17:52:39 martin Exp $");
 
 /*
  * Interrupt support for the Cirrus Logic EP93XX
@@ -257,9 +257,6 @@ ep93xx_intr_init(void)
                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, (i < VIC_NIRQ ? "vic1" : "vic2"),
-                                    iq->iq_name);
        }
        curcpu()->ci_intr_depth = 0;
        set_curcpl(0);
@@ -275,6 +272,20 @@ ep93xx_intr_init(void)
        enable_interrupts(I32_bit);
 }
 
+void
+ep93xx_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, (i < VIC_NIRQ ? "vic1" : "vic2"),
+                                    iq->iq_name);
+       }
+}
+
 void *
 ep93xx_intr_establish(int irq, int ipl, int (*ih_func)(void *), void *arg)
 {
diff -r 27eae7c59d33 -r debd85eb6926 sys/arch/arm/ep93xx/ep93xxvar.h
--- a/sys/arch/arm/ep93xx/ep93xxvar.h   Tue May 02 17:39:54 2023 +0000
+++ b/sys/arch/arm/ep93xx/ep93xxvar.h   Tue May 02 17:52:39 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ep93xxvar.h,v 1.6 2012/11/12 18:00:36 skrll Exp $ */
+/*     $NetBSD: ep93xxvar.h,v 1.6.68.1 2023/05/02 17:52:39 martin Exp $ */
 /*
  * Copyright (c) 2004 Jesse Off
  * All rights reserved.
@@ -69,6 +69,7 @@ extern struct arm32_bus_dma_tag ep93xx_b
 void   ep93xx_intr_init(void);
 void   *ep93xx_intr_establish(int irq, int ipl, int (*)(void *), void *);
 void   ep93xx_intr_disestablish(void *);
+void   ep93xx_intr_evcnt_attach(void);
 /* Platform needs to provide this */
 bus_dma_tag_t ep93xx_bus_dma_init(struct arm32_bus_dma_tag *);
 void   ep93xx_reset(void);
diff -r 27eae7c59d33 -r debd85eb6926 sys/arch/evbarm/tsarm/tsarm_machdep.c
--- a/sys/arch/evbarm/tsarm/tsarm_machdep.c     Tue May 02 17:39:54 2023 +0000
+++ b/sys/arch/evbarm/tsarm/tsarm_machdep.c     Tue May 02 17:52:39 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tsarm_machdep.c,v 1.34 2022/07/03 19:58:42 andvar Exp $ */
+/*     $NetBSD: tsarm_machdep.c,v 1.34.4.1 2023/05/02 17:52:39 martin Exp $ */
 
 /*
  * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tsarm_machdep.c,v 1.34 2022/07/03 19:58:42 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsarm_machdep.c,v 1.34.4.1 2023/05/02 17:52:39 martin Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_console.h"
@@ -857,3 +857,9 @@ ep93xx_bus_dma_init(struct arm32_bus_dma
 
        return dmat;
 }
+
+void
+cpu_startup_hook(void)
+{
+       ep93xx_intr_evcnt_attach();
+}



Home | Main Index | Thread Index | Old Index