Page MenuHomeFreeBSD

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

Authored by olce on Sat, Jan 31, 11:48 AM.
Tags
None
Referenced Files
F143908087: D55005.id170840.diff
Sun, Feb 1, 7:52 PM
Unknown Object (File)
Sun, Feb 1, 1:01 AM
Unknown Object (File)
Sat, Jan 31, 8:13 PM
Unknown Object (File)
Sat, Jan 31, 7:26 PM
Unknown Object (File)
Sat, Jan 31, 5:56 PM
Unknown Object (File)
Sat, Jan 31, 5:28 PM
Subscribers

Details

Summary

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.

PR: 292615
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70277
Build 67160: arc lint + arc unit