Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Nov 2020 01:43:05 +0000 (UTC)
From:      Yuri Pankov <yuripv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368140 - head/sys/x86/cpufreq
Message-ID:  <202011290143.0AT1h5Ze012199@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011290143.0AT1h5Ze012199>