NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/57386: TS7200 panics in evcnt_attach_static
The following reply was made to PR kern/57386; it has been noted by GNATS.
From: Lloyd Parkes <lloyd%must-have-coffee.gen.nz@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/57386: TS7200 panics in evcnt_attach_static
Date: Tue, 2 May 2023 15:07:52 +1200
Well, this week's work has been a complete disaster, so I got on with
this instead.
I can put it into a github gist or on my web server if the email system
mangles the diff. My TS7200 is now running multi-user with this patch
applied.
Cheers,
Lloyd
diff -r 7893cdb2b634 sys/arch/arm/ep93xx/ep93xx_intr.c
--- a/sys/arch/arm/ep93xx/ep93xx_intr.c Tue Apr 25 16:17:59 2023 +0000
+++ b/sys/arch/arm/ep93xx/ep93xx_intr.c Tue May 02 15:04:12 2023 +1200
@@ -257,9 +257,6 @@
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 @@
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 7893cdb2b634 sys/arch/arm/ep93xx/ep93xxvar.h
--- a/sys/arch/arm/ep93xx/ep93xxvar.h Tue Apr 25 16:17:59 2023 +0000
+++ b/sys/arch/arm/ep93xx/ep93xxvar.h Tue May 02 15:04:12 2023 +1200
@@ -69,6 +69,7 @@
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 7893cdb2b634 sys/arch/evbarm/tsarm/tsarm_machdep.c
--- a/sys/arch/evbarm/tsarm/tsarm_machdep.c Tue Apr 25 16:17:59 2023 +0000
+++ b/sys/arch/evbarm/tsarm/tsarm_machdep.c Tue May 02 15:04:12 2023 +1200
@@ -857,3 +857,9 @@
return dmat;
}
+
+void
+cpu_startup_hook(void)
+{
+ ep93xx_intr_evcnt_attach();
+}
Home |
Main Index |
Thread Index |
Old Index