Author: yuripv
Date: Sun Nov 29 01:43:04 2020
New Revision: 368140
URL: https://svnweb.freebsd.org/changeset/base/368140

Log:
  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

Modified:
  head/sys/x86/cpufreq/hwpstate_intel.c

Modified: head/sys/x86/cpufreq/hwpstate_intel.c
==============================================================================
--- head/sys/x86/cpufreq/hwpstate_intel.c       Sun Nov 29 01:32:53 2020        
(r368139)
+++ head/sys/x86/cpufreq/hwpstate_intel.c       Sun Nov 29 01:43:04 2020        
(r368140)
@@ -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:
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to