Page MenuHomeFreeBSD

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

Authored by olce on Sat, Jan 31, 11:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 19, 10:18 PM
Unknown Object (File)
Wed, Feb 18, 10:11 PM
Unknown Object (File)
Wed, Feb 18, 8:35 AM
Unknown Object (File)
Wed, Feb 18, 2:11 AM
Unknown Object (File)
Tue, Feb 17, 7:21 PM
Unknown Object (File)
Sun, Feb 15, 10:52 AM
Unknown Object (File)
Sat, Feb 14, 10:28 PM
Unknown Object (File)
Sat, Feb 14, 9:17 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

olce requested review of this revision.Sat, Jan 31, 11:48 AM
sys/x86/cpufreq/hwpstate_amd.c
269

What is the purpose of having the small function with just one sbuf_printf statement in here? I didn't see any condition that we would reuse this funtion?

Ok I see it is reused in other patch

This revision is now accepted and ready to land.Sat, Feb 7, 2:52 AM