summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2009-06-02 12:50:30 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2009-06-02 12:50:30 +0000
commitf932261b722dab255b11a9352868ae066949052f (patch)
tree438987f104f28e9928197622889fbce5fde21888 /sys/arch
parenta4de34ac39045aae8ad15027d42bf5c4162979c4 (diff)
Add a DIAGNOSTIC panic to ensure we are not running
via an interrupt handler in acpi_sleep_machdep. okay mlarkin@ marco@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index d6a044c0dd3..b398aaea06a 100644
--- a/sys/arch/amd64/amd64/acpi_machdep.c
+++ b/sys/arch/amd64/amd64/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.18 2009/06/01 19:59:18 mlarkin Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.19 2009/06/02 12:50:29 kurt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -201,6 +201,11 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
return (ENXIO);
}
+#ifdef DIAGNOSTIC
+ if (curproc != &proc0)
+ panic("acpi_sleep_machdep: sleeping in non-kernel proc");
+#endif
+
if (rcr3() != pmap_kernel()->pm_pdirpa) {
pmap_activate(curproc);
}