summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/pci/psycho.c
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-11-14 11:29:16 +0000
committertmm <tmm@FreeBSD.org>2002-11-14 11:29:16 +0000
commit57a6c5201893a7bbb755c329c168f987f1b6d165 (patch)
tree408fd9ce82602a52a048b98924191098da5ecbc9 /sys/sparc64/pci/psycho.c
parentcf6e4b6293ddaefff52b7a596301e434664ee542 (diff)
downloadFreeBSD-src-57a6c5201893a7bbb755c329c168f987f1b6d165.zip
FreeBSD-src-57a6c5201893a7bbb755c329c168f987f1b6d165.tar.gz
Don't register the powerfail interrupt as fast in the
non-DEBUGGER_ON_POWERFAIL case so that shutdown_nice() can be called without problems. Reported & tested by: Gavin Atkinson <gavin@ury.york.ac.uk>
Diffstat (limited to 'sys/sparc64/pci/psycho.c')
-rw-r--r--sys/sparc64/pci/psycho.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index 51fb78f..89c6364 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -238,6 +238,12 @@ struct psycho_strayclr {
*
* We really should attach handlers for each.
*/
+#ifdef DEBUGGER_ON_POWERFAIL
+#define PSYCHO_PWRFAIL_INT_FLAGS INTR_FAST
+#else
+#define PSYCHO_PWRFAIL_INT_FLAGS 0
+#endif
+
#define OFW_PCI_TYPE "pci"
struct psycho_desc {
@@ -502,8 +508,8 @@ psycho_attach(device_t dev)
psycho_set_intr(sc, 1, dev, PSR_CE_INT_MAP, 0, psycho_ce);
psycho_set_intr(sc, 2, dev, PSR_PCIAERR_INT_MAP, INTR_FAST,
psycho_bus_a);
- psycho_set_intr(sc, 4, dev, PSR_POWER_INT_MAP, INTR_FAST,
- psycho_powerfail);
+ psycho_set_intr(sc, 4, dev, PSR_POWER_INT_MAP,
+ PSYCHO_PWRFAIL_INT_FLAGS, psycho_powerfail);
/* Psycho-specific initialization. */
if (sc->sc_mode == PSYCHO_MODE_PSYCHO) {
/*
OpenPOWER on IntegriCloud