From: kettenis Date: Thu, 10 Nov 2022 10:37:40 +0000 (+0000) Subject: Put CPUs in the lowest P-state just before the final suspend step. The X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b396fb91afa3c7c94236263237dc577799620833;p=openbsd Put CPUs in the lowest P-state just before the final suspend step. The firmware probably does this for us on ACPI systems with proper S3 support, but this doesn't happen on systems where we park CPUs in a low-power idle state ourselves. ok deraadt@ --- diff --git a/sys/kern/subr_suspend.c b/sys/kern/subr_suspend.c index 58f8ef5be19..ad156f92ce3 100644 --- a/sys/kern/subr_suspend.c +++ b/sys/kern/subr_suspend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_suspend.c,v 1.13 2022/11/05 19:29:46 cheloha Exp $ */ +/* $OpenBSD: subr_suspend.c,v 1.14 2022/11/10 10:37:40 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -142,6 +142,9 @@ top: boothowto |= RB_POWERDOWN; config_suspend_all(DVACT_POWERDOWN); boothowto &= ~RB_POWERDOWN; + + if (cpu_setperf != NULL) + cpu_setperf(0); } error = gosleep(v);