[PATCH 06/20] x86, msr: add missing Intel models

From: Dave Hansen
Date: Thu Jun 02 2016 - 20:19:41 EST



From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>

This patch presumes that Kabylake and Skylake Server will be the
same as the existing Skylake parts and adds them to the MSR
events code.

Also add handling for "WESTMERE2".

Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---

b/arch/x86/events/msr.c | 4 ++++
1 file changed, 4 insertions(+)

diff -puN arch/x86/events/msr.c~x86-intel-familites-msr-fix arch/x86/events/msr.c
--- a/arch/x86/events/msr.c~x86-intel-familites-msr-fix 2016-06-02 15:19:18.176211633 -0700
+++ b/arch/x86/events/msr.c 2016-06-02 15:19:18.179211769 -0700
@@ -40,6 +40,7 @@ static bool test_intel(int idx)
case INTEL_FAM6_NEHALEM_EX:

case INTEL_FAM6_WESTMERE:
+ case INTEL_FAM6_WESTMERE2:
case INTEL_FAM6_WESTMERE_EP:
case INTEL_FAM6_WESTMERE_EX:

@@ -68,6 +69,9 @@ static bool test_intel(int idx)

case INTEL_FAM6_SKYLAKE_MOBILE:
case INTEL_FAM6_SKYLAKE_DESKTOP:
+ case INTEL_FAM6_SKYLAKE_X:
+ case INTEL_FAM6_KABYLAKE_MOBILE:
+ case INTEL_FAM6_KABYLAKE_DESKTOP:
if (idx == PERF_MSR_SMI || idx == PERF_MSR_PPERF)
return true;
break;
_