diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/apm.c | 4 | ||||
-rw-r--r-- | sys/arch/loongson/dev/apm.c | 4 | ||||
-rw-r--r-- | sys/arch/zaurus/dev/zaurus_apm.c | 4 | ||||
-rw-r--r-- | sys/dev/acpi/acpi.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_synch.c | 5 |
5 files changed, 14 insertions, 7 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c index c6b8a21d9d3..02478e33796 100644 --- a/sys/arch/i386/i386/apm.c +++ b/sys/arch/i386/i386/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.113 2015/02/07 01:19:40 deraadt Exp $ */ +/* $OpenBSD: apm.c,v 1.114 2015/09/28 18:36:36 deraadt Exp $ */ /*- * Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved. @@ -253,6 +253,7 @@ apm_suspend(int state) s = splhigh(); disable_intr(); + cold = 2; config_suspend_all(DVACT_SUSPEND); suspend_randomness(); @@ -275,6 +276,7 @@ apm_suspend(int state) inittodr(time_second); config_suspend_all(DVACT_RESUME); + cold = 0; enable_intr(); splx(s); diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c index f04599fcc98..48865f48be1 100644 --- a/sys/arch/loongson/dev/apm.c +++ b/sys/arch/loongson/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.28 2015/02/07 01:19:40 deraadt Exp $ */ +/* $OpenBSD: apm.c,v 1.29 2015/09/28 18:36:36 deraadt Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -380,7 +380,7 @@ apm_suspend(int state) s = splhigh(); (void)disableintr(); - cold = 1; + cold = 2; rv = config_suspend_all(DVACT_SUSPEND); diff --git a/sys/arch/zaurus/dev/zaurus_apm.c b/sys/arch/zaurus/dev/zaurus_apm.c index 26bb24aae9b..a0c2e1685d6 100644 --- a/sys/arch/zaurus/dev/zaurus_apm.c +++ b/sys/arch/zaurus/dev/zaurus_apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_apm.c,v 1.33 2015/02/11 07:05:39 dlg Exp $ */ +/* $OpenBSD: zaurus_apm.c,v 1.34 2015/09/28 18:36:36 deraadt Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de> @@ -656,6 +656,7 @@ zapm_poweroff(void) #endif /* NWSDISPLAY > 0 */ s = splhigh(); + cold = 2; config_suspend_all(DVACT_SUSPEND); suspend_randomness(); @@ -687,6 +688,7 @@ zapm_poweroff(void) zapm_restart(); /* NOTREACHED */ + cold = 0; config_suspend_all(DVACT_RESUME); splx(s); diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 4bb5d543aec..50f46abcf76 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.294 2015/09/06 16:47:48 deraadt Exp $ */ +/* $OpenBSD: acpi.c,v 1.295 2015/09/28 18:36:36 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2316,7 +2316,7 @@ acpi_sleep_state(struct acpi_softc *sc, int state) s = splhigh(); disable_intr(); /* PSL_I for resume; PIC/APIC broken until repair */ - cold = 1; /* Force other code to delay() instead of tsleep() */ + cold = 2; /* Force other code to delay() instead of tsleep() */ if (config_suspend_all(DVACT_SUSPEND) != 0) goto fail_suspend; diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 3ea27fcdc6d..b81d8b9dc99 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_synch.c,v 1.123 2015/09/11 19:13:22 dlg Exp $ */ +/* $OpenBSD: kern_synch.c,v 1.124 2015/09/28 18:36:36 deraadt Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /* @@ -49,6 +49,7 @@ #include <sys/syscallargs.h> #include <sys/pool.h> #include <sys/refcnt.h> +#include <ddb/db_output.h> #include <machine/spinlock.h> @@ -115,6 +116,8 @@ tsleep(const volatile void *ident, int priority, const char *wmesg, int timo) KASSERT(timo || __mp_lock_held(&kernel_lock)); #endif + if (cold == 2) + db_stack_dump(); if (cold || panicstr) { int s; /* |