HomeFreeBSD

hwpstate_amd(4): Register dump: Fine-grained error reporting

Description

hwpstate_amd(4): Register dump: Fine-grained error reporting

If some of the registers cannot be read, report that but continue trying
reading the others. This also has the side benefit of simplifying code.

While here, use sbuf_new_for_sysctl(), and rename 'res' and 'ret', which
are to contain error values, to 'error'.

While here, remove the test on getting the per-cpu structure, as if it
is not present we would have already crashed on device attach.

While here, fix format for printing the CPU ID.

PR: 292615
Reviewed by: aokblast (older version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55005

Details

Provenance
olceAuthored on Jan 29 2026, 4:23 PM
Reviewer
aokblast
Differential Revision
D55005: hwpstate_amd(4): Register dump: Fine-grained error reporting
Parents
rG7bf81e39d830: ls: check fts_children() for errors that may not surface otherwise
Branches
Unknown
Tags
Unknown