Closed tsutsui closed 2 years ago
@moveccr reported: "after clockintr setipl(1) is called from somewhere, and it seems to trigger stray intr 3"
This means spllowersoftclock(9) and CLKF_BASEPRI() could be problematic.
Actually OpenBSD has removed them on 2002 (i.e. before OpenBSD 4.0 that NetBSD/m88k is based on): https://github.com/openbsd/src/commit/12581b04a4be1be63744ec134d84a59f571e65b2 and NetBSD also removed them before NetBSD 5.0 for proper SMP support: https://github.com/NetBSD/src/commit/3363855a4a9244eb1524057a3b760c4ba17dab68
So disabling CLKF_BASEPRI() in sys/arch/m88k/include/cpu.h should be easy and enough for this tree.
diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h
index a274041b03ca..0af96518f91f 100644
--- a/sys/arch/m88k/include/cpu.h
+++ b/sys/arch/m88k/include/cpu.h
@@ -202,7 +202,12 @@ struct clockframe {
/*
* CLKF_BASEPRI: True if we were at spl0 before the interrupt.
*/
+#if 0
+/* XXX: spllowersoftclock(9) could be problematic on m88k/trap.c etc. */
#define CLKF_BASEPRI(framep) ((((struct trapframe *)(framep))->tf_epsr & PSR_IND) == 0)
+#else
+#define CLKF_BASEPRI(framep) 0
+#endif
/*
* LWP_PC: Find out the program counter for the given lwp.
spc(4) often gets:
stray level 3 interrupt
generic HBA error
spc0: selection out while idle; resetting
not sure if nono issue or NetBSD/luna88k issue, though.