hwpstate_intel: don't unconditionally print the error message

Actually check the wrmsr_safe() return value when setting autonomous
HWP for package.

PR:		245582
Differential Revision:	https://reviews.freebsd.org/D24744
This commit is contained in:
Yuri Pankov 2020-11-29 01:43:04 +00:00
parent 83f6b50123
commit 41062d6878
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368140

View File

@ -461,8 +461,10 @@ set_autonomous_hwp(struct hwp_softc *sc)
* not exist." (Intel SDM §14.4.4)
*/
ret = wrmsr_safe(MSR_IA32_HWP_REQUEST_PKG, sc->req);
device_printf(dev,
"Failed to set autonomous HWP for package\n");
if (ret) {
device_printf(dev,
"Failed to set autonomous HWP for package\n");
}
}
out: