From nobody Thu Nov 12 15:10:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jQP3R24PQz70lWp for ; Thu, 12 Nov 2026 15:10:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQP3Q3l5Qz3D1K for ; Thu, 12 Nov 2026 15:10:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); arc=pass ("google.com:s=arc-20260327:i=1"); spf=pass (mx1.freebsd.org: domain of adrian.chadd@gmail.com designates 209.85.160.178 as permitted sender) smtp.mailfrom=adrian.chadd@gmail.com Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-53bb57f1310so48270311cf.2 for ; Thu, 12 Nov 2026 07:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794496257; cv=none; d=google.com; s=arc-20260327; b=nSjEXJ6oqasXmVuLWIYt2Zt1NHPf13kNt/htM9dbVMQoFmbzqzPV3kXErqX21wrRHy i+CPu0KR+uCKJMIeZNnyHKY8OZ8QtDSMzmCscrLfyUtlZ2nMLkrVPYYUVGiajU8c52A8 IOnlqH1VXrWrA4mwlKaN0NNliG4zVzUaD0B6zTRh5VxbjWY5N7wzkqTFVVNcKA6joLeW ZI7CTueDlEorpBQqtuvGyT9skKTkGLWaFxxhqXEbHvW+SR90kPHdcVdU2tNpq8ue8JyJ koAhTBor/OAiTPo7/2LB8zq49AmbB26GcZRStZOGE3sUSqQN8/8HQTaYWoj2IzlWvSvW 3K2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version; bh=VAo9L4z0fgVZ8EmDnHnH+k2emmBA36hrQ7jQk7hgDs0=; fh=C34lHiONd7rJfKcbpL22oyRogNON2CIpdKaEO+6Yo9w=; b=YwAmiFxUH64DAG6VrH2GqE7X6w/T3FJwcN9vuexnaO6c1UB8RqisqZJ4rzo1lGuWV0 Q9U4BAKg4aMtOiXEg3GMXv/3afSIKQBGwE2N3U6cOb+djTfpyYyIDSKC/CsU21tGMAMn PLiGiBCUNP9crJGp7UWhQwIBgTcRs1UAgl9iPwq5BkGoBmqsk15NplT7Oa/6XPpJRkle KRSfsSF2AxBf0i5tbuViytmnvQfoUK0SRt5UAfxhpH2HSj0mGVF2pL992h2EjYwx+Rys ahnQea4H/Cyn4HV71+ABagKGt55TkCMO1Kg6SZBIfCjUTctpu2mdLIGO9BS4/7bn6tEf GbcA==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794496257; x=1795101057; h=content-type:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=VAo9L4z0fgVZ8EmDnHnH+k2emmBA36hrQ7jQk7hgDs0=; b=Ao+B7gx5+RgbvKtm6N9glRxZCMXvPM7bUQC6/9fGmEvdg8eN+q5W9ePg6EOokMPTRe D5vD2yaUadoUOzXPpR/hC3+c7+qXDEkacbeyA1fg4VIAVueVCUFrCEdjnD0vhg5N/YFI VKMh1+wLM3rcWVnVojIlCcM9uBCRJJO7DH5p1t/huy6jToiaDwEfwL1HmcV5P02al5E/ IyXDPqbAWYmjja2XPyNZR1tOxYjFysQcLB7Pm76fatbNhsIczDaVCe1emm4vryPOTA0U 1IGDCeEA1AXIMzbJUc99/WxfpbMdCPL1P04QJ+aQEnsLEJngjVRGXQ8Ud8+DAXLNPs+n IKNg== X-Forwarded-Encrypted: i=1; AL+hErFN0e22Txo+wQjiTbu/paTgY9/Lvmiyn8VYZS+ibZ7FzXZQg+jwIe4HaWxFuTHVOpkexEvpncNAxOY6u+ndGUDh9ZBU@freebsd.org X-Gm-Message-State: APuU4Z/6rnH/8hhzefTLVTQxivyQDX5hl9XxHm2C7Tscef4pFeuvZtiK bkeZtG2L7UYc4g1uNkRDZNwuWSMkkMYyueHpOSsmK9y1OND5M7JIalDke45gvYW7N4gXplO70ju usEf6cUE83esRApHAkjwq9S1U4wmNUak= X-Gm-Gg: AYBFou1dgGnEKmAwsEAhbm4FuIBuWikSbkbdW0cbIjO339zHNMr6r8PtDdsleImnXZM S/DoA5CL0z04UH6JO/z8T7ylT8B3SjdHqvTqLFAuCpZjmOPn6XHvt80VOcwSlWIigMioZXVCvkj WS7zuMoa7MIWW3vVkpKsH/rSeGwZqnXJ0BLP8SaMkE4GjFZhbH701X+aaRAjy07/rDjR4pti8OP StN5c3mE32q8YZ1P1S4vzE9+21g7VJJ/TajEKHfp0uOEir2XnX5JrzkosQPlTmJs9q8IS/uO6kj EH+5wyw0jWfbkne5kpIRdXQTeFQlZoYhf1n8BicHreltq1VRFVnXSEpx0Rs8CzTvIUqIgTP/bZQ lsjoHTz9w3PdbciCudPn8gJVRjRK7dLKh8c7/nXshk5ifmPEq+4ynf5mMIj3KEe4EUom7NwXw9j 2lxrXTS+GluJyS0IiVUEJtbQquwUbcrDLF/3YtJWB5XcDsTPhDRRknXnGWuqSyCw7faVNkFChmP CADWbJ5mK05PodvTZS7E1rAvxxp/wU3Sq0/8JjdkAz8hnh81Lx0DKpZYisgXxAKrmIJkWVh X-Received: by 2002:a05:620a:2614:b0:939:31b5:4e08 with SMTP id af79cd13be357-947afa4eaf0mr1015178485a.0.1794496257265; Thu, 12 Nov 2026 07:10:57 -0800 (PST) List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6af4409e.13ea8.25837c99@gitrepo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Thu, 12 Nov 2026 07:10:46 -0800 X-Gm-Features: AclHuK-fpV_QCz9kQYKfuu_b8W8ZHEgbX9yXX6IhHBHeWdR7oMSCv7r-9N4USRA Message-ID: Subject: Re: git: 427747fc16c9 - main - acpi_cpu: No longer disable idle during suspend To: Aymeric Wibo , Olivier Certner Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000f71823066015b70d" X-Rspamd-Queue-Id: 4jQP3Q3l5Qz3D1K X-Spamd-Bar: - X-Spamd-Result: default: False [-1.00 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.160.178:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.178:from]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; ALIAS_RESOLVED(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] --000000000000f71823066015b70d Content-Type: text/plain; charset="UTF-8" note - suspend/resume is now flakey on a couple of my laptops. I don't know what combination of kern or drm-kmod changes have caused it. please list out the set of hardware you're testing these changes on. -adrian On Wed, 11 Nov 2026 at 10:20, Adrian Chadd wrote: > Hey err! > > I haven't tested this yet on my laptops (which all run ACPI.) > > Are y'all absolutely /sure/ that this can't possibly ever try to idle > during suspend on ACPI platforms? > And thus this was truly dead code? > > Would you mind listing out what hardware / config you're testing on when > you do these changes? > > > > -adrian > > > On Wed, 11 Nov 2026 at 02:17, Aymeric Wibo wrote: > >> The branch main has been updated by obiwac: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=427747fc16c9be5e4d4eb31a797d7854c4fd839f >> >> commit 427747fc16c9be5e4d4eb31a797d7854c4fd839f >> Author: Aymeric Wibo >> AuthorDate: 2026-02-25 09:39:05 +0000 >> Commit: Aymeric Wibo >> CommitDate: 2026-11-11 10:15:46 +0000 >> >> acpi_cpu: No longer disable idle during suspend >> >> This had been introduced in 3331373ce733 ("Disable CPU idle states >> during suspend and reenable them during resume.") to work around >> C-state >> selection logic which would skip C-states which returned immediately, >> considering them "broken". >> >> This workaround is incompatible with suspend-to-idle however, which >> requires CPUs to be in their idle states, and is no longer relevant >> either way since b0baaaaecf1a ("Avoid comparing negative signed to >> positive unsignad values.") removed the C-state skipping logic the >> previous change was working around. >> >> Reviewed by: olce >> Sponsored by: The FreeBSD Foundation >> Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/71 >> Differential Revision: https://reviews.freebsd.org/D60649 >> --- >> sys/dev/acpica/acpi_cpu.c | 30 ++---------------------------- >> 1 file changed, 2 insertions(+), 28 deletions(-) >> >> diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c >> index d3ac92f920ab..9a523611a7f9 100644 >> --- a/sys/dev/acpica/acpi_cpu.c >> +++ b/sys/dev/acpica/acpi_cpu.c >> @@ -159,8 +159,6 @@ ACPI_SERIAL_DECL(cpu, "ACPI CPU"); >> >> static int acpi_cpu_probe(device_t dev); >> static int acpi_cpu_attach(device_t dev); >> -static int acpi_cpu_suspend(device_t dev); >> -static int acpi_cpu_resume(device_t dev); >> static int acpi_pcpu_get_id(device_t dev, uint32_t acpi_id, >> u_int *cpu_id); >> static void acpi_cpu_madt_handler(ACPI_SUBTABLE_HEADER *entry, void >> *arg); >> @@ -199,8 +197,8 @@ static device_method_t acpi_cpu_methods[] = { >> DEVMETHOD(device_attach, acpi_cpu_attach), >> DEVMETHOD(device_detach, bus_generic_detach), >> DEVMETHOD(device_shutdown, acpi_cpu_shutdown), >> - DEVMETHOD(device_suspend, acpi_cpu_suspend), >> - DEVMETHOD(device_resume, acpi_cpu_resume), >> + DEVMETHOD(device_suspend, bus_generic_suspend), >> + DEVMETHOD(device_resume, bus_generic_resume), >> >> /* Bus interface */ >> DEVMETHOD(bus_add_child, acpi_cpu_add_child), >> @@ -531,30 +529,6 @@ is_idle_disabled(struct acpi_cpu_softc *sc) >> } >> #endif >> >> -/* >> - * Disable any entry to the idle function during suspend and re-enable it >> - * during resume. >> - */ >> -static int >> -acpi_cpu_suspend(device_t dev) >> -{ >> - int error; >> - >> - error = bus_generic_suspend(dev); >> - if (error) >> - return (error); >> - disable_idle(device_get_softc(dev)); >> - return (0); >> -} >> - >> -static int >> -acpi_cpu_resume(device_t dev) >> -{ >> - >> - enable_idle(device_get_softc(dev)); >> - return (bus_generic_resume(dev)); >> -} >> - >> /* >> * Find the processor associated with a given ACPI ID. >> */ >> >> --000000000000f71823066015b70d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
note - suspend/resume is now flakey on a couple of my= laptops. I don't know what combination of kern or drm-kmod changes hav= e caused it.

please list out the set of hardware y= ou're testing these changes on.


-adrian


On Wed, 11 Nov 2026 at 1= 0:20, Adrian Chadd <adrian@freebsd= .org> wrote:
Hey err!

I haven't t= ested this=C2=A0yet=C2=A0on my laptops (which all run ACPI.)

=
Are y'all absolutely /sure/ that this can't possibly eve= r try to idle during suspend on ACPI platforms?
And thus this was= truly dead code?

Would you mind listing out what = hardware / config you're testing on when you do these changes?



-adrian

=

= On Wed, 11 Nov 2026 at 02:17, Aymeric Wibo <obiwac@freebsd.org> wrote:
The branch main has been upda= ted by obiwac:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D427747fc16c9be5e4d4eb31a797d7854c4fd839f
commit 427747fc16c9be5e4d4eb31a797d7854c4fd839f
Author:=C2=A0 =C2=A0 =C2=A0Aymeric Wibo <obiwac@FreeBSD.org>
AuthorDate: 2026-02-25 09:39:05 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Aymeric Wibo <obiwac@FreeBSD.org>
CommitDate: 2026-11-11 10:15:46 +0000

=C2=A0 =C2=A0 acpi_cpu: No longer disable idle during suspend

=C2=A0 =C2=A0 This had been introduced in 3331373ce733 ("Disable CPU i= dle states
=C2=A0 =C2=A0 during suspend and reenable them during resume.") to wor= k around C-state
=C2=A0 =C2=A0 selection logic which would skip C-states which returned imme= diately,
=C2=A0 =C2=A0 considering them "broken".

=C2=A0 =C2=A0 This workaround is incompatible with suspend-to-idle however,= which
=C2=A0 =C2=A0 requires CPUs to be in their idle states, and is no longer re= levant
=C2=A0 =C2=A0 either way since b0baaaaecf1a ("Avoid comparing negative= signed to
=C2=A0 =C2=A0 positive unsignad values.") removed the C-state skipping= logic the
=C2=A0 =C2=A0 previous change was working around.

=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 olce
=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0The FreeBSD Foundation
=C2=A0 =C2=A0 Pull Request:=C2=A0 =C2=A0https://ron-= dev.freebsd.org/FreeBSD/src/pulls/71
=C2=A0 =C2=A0 Differential Revision:=C2=A0 https://reviews.freebsd= .org/D60649
---
=C2=A0sys/dev/acpica/acpi_cpu.c | 30 ++----------------------------
=C2=A01 file changed, 2 insertions(+), 28 deletions(-)

diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index d3ac92f920ab..9a523611a7f9 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -159,8 +159,6 @@ ACPI_SERIAL_DECL(cpu, "ACPI CPU");

=C2=A0static int=C2=A0 =C2=A0 =C2=A0acpi_cpu_probe(device_t dev);
=C2=A0static int=C2=A0 =C2=A0 =C2=A0acpi_cpu_attach(device_t dev);
-static int=C2=A0 =C2=A0 =C2=A0acpi_cpu_suspend(device_t dev);
-static int=C2=A0 =C2=A0 =C2=A0acpi_cpu_resume(device_t dev);
=C2=A0static int=C2=A0 =C2=A0 =C2=A0acpi_pcpu_get_id(device_t dev, uint32_t= acpi_id,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 u_int= *cpu_id);
=C2=A0static void=C2=A0 =C2=A0 acpi_cpu_madt_handler(ACPI_SUBTABLE_HEADER *= entry, void *arg);
@@ -199,8 +197,8 @@ static device_method_t acpi_cpu_methods[] =3D {
=C2=A0 =C2=A0 =C2=A0DEVMETHOD(device_attach,=C2=A0 =C2=A0acpi_cpu_attach),<= br> =C2=A0 =C2=A0 =C2=A0DEVMETHOD(device_detach,=C2=A0 =C2=A0bus_generic_detach= ),
=C2=A0 =C2=A0 =C2=A0DEVMETHOD(device_shutdown, acpi_cpu_shutdown),
-=C2=A0 =C2=A0 DEVMETHOD(device_suspend,=C2=A0 acpi_cpu_suspend),
-=C2=A0 =C2=A0 DEVMETHOD(device_resume,=C2=A0 =C2=A0acpi_cpu_resume),
+=C2=A0 =C2=A0 DEVMETHOD(device_suspend,=C2=A0 bus_generic_suspend),
+=C2=A0 =C2=A0 DEVMETHOD(device_resume,=C2=A0 =C2=A0bus_generic_resume),
=C2=A0 =C2=A0 =C2=A0/* Bus interface */
=C2=A0 =C2=A0 =C2=A0DEVMETHOD(bus_add_child,=C2=A0 =C2=A0acpi_cpu_add_child= ),
@@ -531,30 +529,6 @@ is_idle_disabled(struct acpi_cpu_softc *sc)
=C2=A0}
=C2=A0#endif

-/*
- * Disable any entry to the idle function during suspend and re-enable it<= br> - * during resume.
- */
-static int
-acpi_cpu_suspend(device_t dev)
-{
-=C2=A0 =C2=A0 int error;
-
-=C2=A0 =C2=A0 error =3D bus_generic_suspend(dev);
-=C2=A0 =C2=A0 if (error)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0return (error);
-=C2=A0 =C2=A0 disable_idle(device_get_softc(dev));
-=C2=A0 =C2=A0 return (0);
-}
-
-static int
-acpi_cpu_resume(device_t dev)
-{
-
-=C2=A0 =C2=A0 enable_idle(device_get_softc(dev));
-=C2=A0 =C2=A0 return (bus_generic_resume(dev));
-}
-
=C2=A0/*
=C2=A0 * Find the processor associated with a given ACPI ID.
=C2=A0 */

--000000000000f71823066015b70d--