Pull up following revision(s) (requested by tsutsui in ticket #1840):
sys/dev/hil/hil.c: revision 1.8 Fix "stray level 1 interrupt" panic by pressing keys during autoconf(9). Also explicitly initialize sc->sc_status = HIL_STATUS_BUSY in hil_attach(). Previously hil_intr(9) returned immediately during 'cold', but all interrupts are enabled at the end of configure() (actually in MD cpu_configure()) and cold is cleared in confiugre2() after configure(), so there is a small window when hil interrupts can be triggered during cold. It looks there is no problem to process hil_intr() before hil_attach_deferre() is called via configure2() because we already check 'sc->sc_status != HIL_STATUS_BUSY' on processing a kthread. Note this seems also to appease the similar panic on mame's hp9k370 emulation (though mame's emulation around DMAC looks still incomplete).
This commit is contained in:
parent
f0c51849e8
commit
3a6c3c1b71
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hil.c,v 1.3 2018/09/03 16:29:31 riastradh Exp $ */
|
||||
/* $NetBSD: hil.c,v 1.3.4.1 2024/05/16 12:23:13 martin Exp $ */
|
||||
/* $OpenBSD: hil.c,v 1.24 2010/11/20 16:45:46 miod Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, Miodrag Vallat.
|
||||
|
@ -150,6 +150,7 @@ hil_attach(struct hil_softc *sc, int *hil_is_console)
|
|||
sc->sc_cmdbp = sc->sc_cmdbuf;
|
||||
sc->sc_pollbp = sc->sc_pollbuf;
|
||||
sc->sc_console = hil_is_console;
|
||||
sc->sc_status = HIL_STATUS_BUSY;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -269,9 +270,6 @@ hil_intr(void *v)
|
|||
struct hil_softc *sc = v;
|
||||
uint8_t c, stat;
|
||||
|
||||
if (cold)
|
||||
return 0;
|
||||
|
||||
stat = bus_space_read_1(sc->sc_bst, sc->sc_bsh, HILP_STAT);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue