diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2024-05-26 13:37:33 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2024-05-26 13:37:33 +0000 |
commit | 2ee6254ea63491706560467bdc63c0190ca93848 (patch) | |
tree | e73aa89bd2fbf3209e08f66274908978bd470745 /sys/kern | |
parent | 5858a9930413b167f6b31abaf7562e58980d5a9a (diff) |
Implement wakeup interrupts on amd64. Provide a dummy implementation for
i386 such that we can call the necessary hooks in the suspend/resume code
without adding #ifdefs. Tweak the arm64 implementation such that we can
call the hooks earlier as this is necessary to mask MSI and MSI-X
interrupts on arm64.
ok deraadt@, mlarkin@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_suspend.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_suspend.c b/sys/kern/subr_suspend.c index 1b4f4062918..40f7fa7bfc4 100644 --- a/sys/kern/subr_suspend.c +++ b/sys/kern/subr_suspend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_suspend.c,v 1.16 2023/07/12 18:40:06 cheloha Exp $ */ +/* $OpenBSD: subr_suspend.c,v 1.17 2024/05/26 13:37:32 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -132,6 +132,7 @@ top: s = splhigh(); intr_disable(); /* PSL_I for resume; PIC/APIC broken until repair */ cold = 2; /* Force other code to delay() instead of tsleep() */ + intr_enable_wakeup(); if (config_suspend_all(DVACT_SUSPEND) != 0) { sleep_abort(v); @@ -172,6 +173,7 @@ fail_pts: config_suspend_all(DVACT_RESUME); fail_suspend: + intr_disable_wakeup(); cold = 0; intr_enable(); splx(s); |