Bug 214370

Summary: acpi(4) reports outdated sysctls
Product: Documentation Reporter: Fernando Herrero Carrón <nq1n407ba>
Component: Manual PagesAssignee: Guangyuan Yang <ygy>
Status: Closed FIXED    
Severity: Affects Only Me CC: doc, felix.the.red, ygy
Priority: --- Keywords: patch-ready
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
acpi(4) patch none

Description Fernando Herrero Carrón 2016-11-09 20:44:51 UTC
On FreeBSD 11.0-RELEASE-p2 #0, consulting acpi(4) I see the following sysctl:

hw.acpi.cpu.cx_supported

However, on the shell:

% sysctl hw.acpi.cpu.cx_supported
sysctl: unknown oid 'hw.acpi.cpu.cx_supported'

Inspecting actual sysctls:

% sudo sysctl -a | grep cx
has_pipe_cxsr: no
hw.acpi.cpu.cx_lowest: C8
dev.cpu.3.cx_method: C1/mwait/hwc C2/mwait/hwc/bma C3/mwait/hwc/bma
dev.cpu.3.cx_usage_counters: 6920 1550 84854
dev.cpu.3.cx_usage: 7.41% 1.66% 90.92% last 49us
dev.cpu.3.cx_lowest: C8
dev.cpu.3.cx_supported: C1/1/3 C2/2/205 C3/3/245
[...]

It seems that cx_supported move from hw.acpi to dev, but acpi(4) failed to reflect this fact.
Comment 1 Felix Johnson freebsd_triage 2021-09-20 02:39:07 UTC
Created attachment 228036 [details]
acpi(4) patch

Change location of cx_supported sysctl to dev.cpu.N.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-10-13 00:47:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=6882064d0ced456c89d161da4bc43c5d97bab60b

commit 6882064d0ced456c89d161da4bc43c5d97bab60b
Author:     Felix Johnson <felix.the.red@gmail.com>
AuthorDate: 2021-10-13 00:42:14 +0000
Commit:     Guangyuan Yang <ygy@FreeBSD.org>
CommitDate: 2021-10-13 00:47:03 +0000

    acpi(4): Correct outdated sysctl

    This changes the location of cx_supported sysctl to dev.cpu.N.

    PR:             214370
    MFC after:      3 days

 share/man/man4/acpi.4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-10-18 19:04:33 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=cf560d6b3620851c4041581dbfd6eabc10bfc332

commit cf560d6b3620851c4041581dbfd6eabc10bfc332
Author:     Felix Johnson <felix.the.red@gmail.com>
AuthorDate: 2021-10-13 00:42:14 +0000
Commit:     Guangyuan Yang <ygy@FreeBSD.org>
CommitDate: 2021-10-18 19:03:39 +0000

    acpi(4): Correct outdated sysctl

    This changes the location of cx_supported sysctl to dev.cpu.N.

    PR:             214370

    (cherry picked from commit 6882064d0ced456c89d161da4bc43c5d97bab60b)

 share/man/man4/acpi.4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)