summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2009-06-04 23:32:06 +0000
committermlarkin <mlarkin@openbsd.org>2009-06-04 23:32:06 +0000
commitc7cb98d1dd6a2493d5647949b1975704acf09678 (patch)
tree4081bd6efcb80c87b3470c4567353480b658413f /sys
parentFix problem where line numbers get out of sync on a region-kill (C-w). (diff)
downloadwireguard-openbsd-c7cb98d1dd6a2493d5647949b1975704acf09678.tar.xz
wireguard-openbsd-c7cb98d1dd6a2493d5647949b1975704acf09678.zip
Ensure we are sleeping from the kernel. Code changed to match i386.
ok art
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index b398aaea06a..83edd9e0ed7 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.19 2009/06/02 12:50:29 kurt Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.20 2009/06/04 23:32:06 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -201,13 +201,10 @@ 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);
+
+ KASSERT(rcr3() == pmap_kernel()->pm_pdirpa);
}
/*