summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-10-20 19:08:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-10-20 19:08:40 +0000
commit16b9274883e09c1e16ec08ea6fefe6d3b3e9be9e (patch)
treef9bfc3e4eb6c4331bf876c8c39b11380f28ac23b
parent5a17bf70dd1bafbc86dc989ce06e01499f45309c (diff)
move sio_intr_shutdown() from being a shutdownhook, and do it directly in
boot() as required. ok miod
-rw-r--r--sys/arch/alpha/alpha/machdep.c10
-rw-r--r--sys/arch/alpha/pci/sio_pic.c6
2 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 2538092cac1..381a6b73597 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.137 2012/10/08 21:47:45 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.138 2012/10/20 19:08:38 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -124,6 +124,10 @@
#include <dev/tc/ioasicvar.h>
#endif
+#ifdef BROKEN_PROM_CONSOLE
+extern void sio_intr_shutdown(void);
+#endif
+
int cpu_dump(void);
int cpu_dumpsize(void);
u_long cpu_dump_mempagecnt(void);
@@ -1030,6 +1034,10 @@ haltsys:
doshutdownhooks();
config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+#ifdef BROKEN_PROM_CONSOLE
+ sio_intr_shutdown(NULL);
+#endif
+
#if defined(MULTIPROCESSOR)
#if 0 /* XXX doesn't work when called from here?! */
/* Kill off any secondary CPUs. */
diff --git a/sys/arch/alpha/pci/sio_pic.c b/sys/arch/alpha/pci/sio_pic.c
index 9ae639cf39d..1f5bd89f2ae 100644
--- a/sys/arch/alpha/pci/sio_pic.c
+++ b/sys/arch/alpha/pci/sio_pic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sio_pic.c,v 1.32 2011/04/15 20:40:05 deraadt Exp $ */
+/* $OpenBSD: sio_pic.c,v 1.33 2012/10/20 19:08:39 deraadt Exp $ */
/* $NetBSD: sio_pic.c,v 1.28 2000/06/06 03:10:13 thorpej Exp $ */
/*-
@@ -353,7 +353,6 @@ sio_intr_setup(pc, iot)
initial_ocw1[1] = bus_space_read_1(sio_iot, sio_ioh_icu2, 1);
initial_elcr[0] = (*sio_read_elcr)(0); /* XXX */
initial_elcr[1] = (*sio_read_elcr)(1); /* XXX */
- shutdownhook_establish(sio_intr_shutdown, 0);
#endif
sio_intr = alpha_shared_intr_alloc(ICU_LEN);
@@ -408,6 +407,9 @@ void
sio_intr_shutdown(arg)
void *arg;
{
+ if (sio_write_elcr == NULL)
+ return;
+
/*
* Restore the initial values, to make the PROM happy.
*/