lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160602001215.771A0149@viggo.jf.intel.com>
Date:	Wed, 01 Jun 2016 17:12:15 -0700
From:	Dave Hansen <dave@...1.net>
To:	linux-kernel@...r.kernel.org
Cc:	x86@...nel.org, Dave Hansen <dave@...1.net>,
	dave.hansen@...ux.intel.com, srinivas.pandruvada@...ux.intel.com,
	lenb@...nel.org, rjw@...ysocki.net, viresh.kumar@...aro.org,
	linux-pm@...r.kernel.org
Subject: [PATCH 13/20] x86, cpufreq: use Intel family name macros for intel_pstate cpufreq driver


From: Dave Hansen <dave.hansen@...ux.intel.com>

Another straightforward replacement of magic numbers.

Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: Len Brown <lenb@...nel.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Viresh Kumar <viresh.kumar@...aro.org>
Cc: linux-pm@...r.kernel.org
---

 b/drivers/cpufreq/intel_pstate.c |   37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff -puN drivers/cpufreq/intel_pstate.c~x86-intel-families-cpufreq-pstate drivers/cpufreq/intel_pstate.c
--- a/drivers/cpufreq/intel_pstate.c~x86-intel-families-cpufreq-pstate	2016-06-01 15:45:08.102122880 -0700
+++ b/drivers/cpufreq/intel_pstate.c	2016-06-01 15:45:08.106123062 -0700
@@ -35,6 +35,7 @@
 #include <asm/msr.h>
 #include <asm/cpu_device_id.h>
 #include <asm/cpufeature.h>
+#include <asm/intel-family.h>
 
 #define ATOM_RATIOS		0x66a
 #define ATOM_VIDS		0x66b
@@ -1352,29 +1353,29 @@ static void intel_pstate_update_util(str
 			(unsigned long)&policy }
 
 static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
-	ICPU(0x2a, core_params),
-	ICPU(0x2d, core_params),
-	ICPU(0x37, silvermont_params),
-	ICPU(0x3a, core_params),
-	ICPU(0x3c, core_params),
-	ICPU(0x3d, core_params),
-	ICPU(0x3e, core_params),
-	ICPU(0x3f, core_params),
-	ICPU(0x45, core_params),
-	ICPU(0x46, core_params),
-	ICPU(0x47, core_params),
-	ICPU(0x4c, airmont_params),
-	ICPU(0x4e, core_params),
-	ICPU(0x4f, core_params),
-	ICPU(0x5e, core_params),
-	ICPU(0x56, core_params),
-	ICPU(0x57, knl_params),
+	ICPU(INTEL_FAM6_MODEL_SANDYBRIDGE, core_params),
+	ICPU(INTEL_FAM6_MODEL_SANDYBRIDGE_X, core_params),
+	ICPU(INTEL_FAM6_MODEL_ATOM_SILVERMONT1, silvermont_params),
+	ICPU(INTEL_FAM6_MODEL_IVYBRIDGE, core_params),
+	ICPU(INTEL_FAM6_MODEL_HASWELL_CORE, core_params),
+	ICPU(INTEL_FAM6_MODEL_BROADWELL_CORE_M, core_params),
+	ICPU(INTEL_FAM6_MODEL_IVYBRIDGE_X, core_params),
+	ICPU(INTEL_FAM6_MODEL_HASWELL_X, core_params),
+	ICPU(INTEL_FAM6_MODEL_HASWELL_ULT, core_params),
+	ICPU(INTEL_FAM6_MODEL_HASWELL_GT3E, core_params),
+	ICPU(INTEL_FAM6_MODEL_BROADWELL_GT3E, core_params),
+	ICPU(INTEL_FAM6_MODEL_ATOM_AIRMONT, airmont_params),
+	ICPU(INTEL_FAM6_MODEL_SKYLAKE_MOBILE, core_params),
+	ICPU(INTEL_FAM6_MODEL_BROADWELL_X, core_params),
+	ICPU(INTEL_FAM6_MODEL_SKYLAKE_DESKTOP, core_params),
+	ICPU(INTEL_FAM6_MODEL_BROADWELL_XEON_D, core_params),
+	ICPU(INTEL_FAM6_MODEL_XEON_PHI_KNL, knl_params),
 	{}
 };
 MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
 
 static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] = {
-	ICPU(0x56, core_params),
+	ICPU(INTEL_FAM6_MODEL_BROADWELL_XEON_D, core_params),
 	{}
 };
 
_

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ