From nobody Wed Nov 11 11:31:19 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 4jPhDS2Hbzz704n5 for ; Wed, 11 Nov 2026 11:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 4jPhDS04Cmz3DZg for ; Wed, 11 Nov 2026 11:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794396680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KhaEfMvyHfyvMeacivE79v2OZklR/DyC2n2A9HCorUM=; b=ZGgxTNuibDVIKEpMzs6T/dv/tEtocU8GOY428VpOuuGAAZlb48PhRrGe/s6/AIAir45qno CaZWe+G9oSk3j4S6RzohInRnw8v8eU0vlXDfRX9Ef2k/h0lzPADv8LY7XCSFURfpg9YfaV 74s+pt8/MjUDg/H23XKFi5OAZTXQHh8nvkqf36hVvEhRm6lhmXcIpgUwJlpEPvdnPY8SfP Ts/C6Wx8flzkkm2/0Y3hPXkjq4gvOIzjS1i0nAsT1q/7O+t9nUVRwNAT1Ir5yTyMx8XRn0 AdOh6XSot9vkJdvQq5WsZ00gn5q87ezt5ohHtpwjUmc1292gT7BwhJScezRVTA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794396680; b=V5Fuuwm+7ejceETu6mnUc4PhGCBQ0dhdIz9Qzjtzwi1BejWWIwJjmd8dckv6pFn5NSh7JS hIgsqsDyLgnij/uQQE9nfrYbOZMpXHhSqoytBpusk6jE2FzBDFgajmXu3wAXeH57kfdkzm VrYTTd63+EsBskmBRohEvxnsjr14o9qz0b00sDxtXFn8rk3Y2VbAw8ndygE+9apitk1JwT VSMcUt2uFQCg+nYjIs+rVCFpkiv2hf3KLUm02WUz8IWMf8U29lG97N7CATSnmTRrB4dKtC EB7xRELdppnERI0A2zQGy/ZEruqaN1QbfGg/mfZ0if9DtPKAeTWq6hw2ifipzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794396680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KhaEfMvyHfyvMeacivE79v2OZklR/DyC2n2A9HCorUM=; b=C8pqfG5JbtA7tQup6BGcvf16kf17+SOfnjAPHfEpUnd6YQ5DAcpzyQHdwG8k2qc14POpYm CqQI/ivMSJVd/OzBpZrB69ldv4MRfiPh3s+ZbkJ6cdgZkCKBVbZFEAOzGIvOZxm3sZwxvM C13dG+CRZnaaFlIzUNojfEB/y/gcEzhWIxCFqBzxjfYKX+B69PLdaTXcCPxAuEe2f5K816 ZeCSL8m/IdblyFTphj4jtPZUXxNJsimpi6bCwtUEdmBtSvN03v8GWMpWp5cBEr67Wh6KYy e/cpXDMkLh0P8ym+wueQJQiYEoXDHwIsQZ1ns26SJ9y6JDSZIMBGURdapPCROw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jPhDR6ZgFz1Bwm for ; Wed, 11 Nov 2026 11:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c832 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 11 Nov 2026 11:31:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: ff3f704d922a - main - acpi_cpu: Bring back setting BM_RLD on resume 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff3f704d922a7e0c8c32525fa0ebfc5a6e397160 Auto-Submitted: auto-generated Date: Wed, 11 Nov 2026 11:31:19 +0000 Message-Id: <6af45207.1c832.4d7821e4@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=ff3f704d922a7e0c8c32525fa0ebfc5a6e397160 commit ff3f704d922a7e0c8c32525fa0ebfc5a6e397160 Author: Aymeric Wibo AuthorDate: 2026-11-11 11:09:28 +0000 Commit: Aymeric Wibo CommitDate: 2026-11-11 11:30:54 +0000 acpi_cpu: Bring back setting BM_RLD on resume enable_idle(), which was called on resume before 427747fc16c9 ("acpi_cpu: No longer disable idle during suspend"), also set BM_RLD. This commit brings back just setting BM_RLD on resume because some firmware might not be doing this itself on some machines. Reviewed by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D61431 --- sys/dev/acpica/acpi_cpu.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index 9a523611a7f9..267c0d1cf7f5 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -169,6 +169,7 @@ static device_t acpi_cpu_add_child(device_t dev, u_int order, const char *name, static int acpi_cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result); static int acpi_cpu_shutdown(device_t dev); +static int acpi_cpu_resume(device_t dev); static void acpi_cpu_cx_probe(struct acpi_cpu_softc *sc); static void acpi_cpu_generic_cx_probe(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_cst(struct acpi_cpu_softc *sc); @@ -198,7 +199,7 @@ static device_method_t acpi_cpu_methods[] = { DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, acpi_cpu_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_resume, acpi_cpu_resume), /* Bus interface */ DEVMETHOD(bus_add_child, acpi_cpu_add_child), @@ -511,13 +512,18 @@ disable_idle(struct acpi_cpu_softc *sc) } static void -enable_idle(struct acpi_cpu_softc *sc) +set_bm_rld(struct acpi_cpu_softc *sc) { + if (sc->cpu_cx_count > sc->cpu_non_c3 + 1 && + (cpu_quirks & CPU_QUIRK_NO_BM_CTRL) == 0) + AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 1); +} - if (sc->cpu_cx_count > sc->cpu_non_c3 + 1 && - (cpu_quirks & CPU_QUIRK_NO_BM_CTRL) == 0) - AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 1); - sc->cpu_disable_idle = FALSE; +static void +enable_idle(struct acpi_cpu_softc *sc) +{ + set_bm_rld(sc); + sc->cpu_disable_idle = FALSE; } #if defined(__i386__) || defined(__amd64__) @@ -529,6 +535,18 @@ is_idle_disabled(struct acpi_cpu_softc *sc) } #endif +static int +acpi_cpu_resume(device_t dev) +{ + /* + * XXX It probably makes more sense to do this once in the S3/S4 resume + * path, as BM_RLD is a global PM1_CNT bit only lost there, rather than + * for each acpi_cpu. + */ + set_bm_rld(device_get_softc(dev)); + return (bus_generic_resume(dev)); +} + /* * Find the processor associated with a given ACPI ID. */