Subject: re: Ultra 30 almost working
To: None <eeh@netbsd.org, mrg@eterna.com.au>
From: None <eeh@netbsd.org>
List: port-sparc64
Date: 12/13/2001 19:21:51
Here's a new improved patch to try:
Index: psycho.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/dev/psycho.c,v
retrieving revision 1.39
diff -p -u -r1.39 psycho.c
--- psycho.c 2001/10/07 20:30:41 1.39
+++ psycho.c 2001/12/13 19:21:20
@@ -416,6 +416,7 @@ found:
* arrive here, start up the IOMMU and get a config space tag.
*/
if (osc == NULL) {
+ uint64_t timeo;
/*
* Establish handlers for interesting interrupts....
@@ -444,6 +445,28 @@ found:
psycho_set_intr(sc, 1, psycho_wakeup,
&sc->sc_regs->pwrmgt_int_map,
&sc->sc_regs->pwrmgt_clr_int);
+
+
+ /*
+ * Apparently the kernel is spending too much time in nucleus
+ * mode with interrupts disabled and a number of machines with
+ * psycho and psycho+ controllers are losing interrupts.
+ * We'll try setting the interrupt retry timeout to 0xff
+ * (which is what sysio is set to) for the moment, which seems
+ * to help alleviate this problem until the trap handlers can
+ * be revamped.
+ */
+ timeo = bus_space_read_8(sc->sc_bustag,
+ (bus_space_handle_t)
+ (u_long)&sc->sc_regs->intr_retry_timer, 0);
+ if (timeo < 0xff) {
+ printf("increasing interrupt retry timeout "
+ "from %lx to 0xff\n", (long)timeo);
+ bus_space_write_8(sc->sc_bustag,
+ (bus_space_handle_t)
+ (u_long)&sc->sc_regs->intr_retry_timer, 0,
+ 0xff);
+ }
/*
* Setup IOMMU and PCI configuration if we're the first