diff options
author | Dave Hansen <dave.hansen@linux.intel.com> | 2016-06-02 20:19:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-06-08 06:05:58 -0400 |
commit | 7f2236d0bf9a33bb539551b653ae842430654240 (patch) | |
tree | fda16c2a71c8ead64794aba568575b263f681336 | |
parent | ef5f9f47d4ec4cf42bac48c7c4dafacc1b9f0630 (diff) |
perf/x86/rapl: Use Intel family macros for RAPL
Use the new INTEL_FAM6_* macros for rapl.c.
Note that this is missing at least one Westmere model and Skylake
Server which will we fixed later in this series.
The resulting binary structure 'rapl_cpu_match' is the same
before and after this patch.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: jacob.jun.pan@intel.com
Link: http://lkml.kernel.org/r/20160603001930.6AC50BE3@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/events/intel/rapl.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c index e30eef4f29a6..8012fe6c7c8b 100644 --- a/arch/x86/events/intel/rapl.c +++ b/arch/x86/events/intel/rapl.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/slab.h> | 55 | #include <linux/slab.h> |
56 | #include <linux/perf_event.h> | 56 | #include <linux/perf_event.h> |
57 | #include <asm/cpu_device_id.h> | 57 | #include <asm/cpu_device_id.h> |
58 | #include <asm/intel-family.h> | ||
58 | #include "../perf_event.h" | 59 | #include "../perf_event.h" |
59 | 60 | ||
60 | MODULE_LICENSE("GPL"); | 61 | MODULE_LICENSE("GPL"); |
@@ -786,26 +787,26 @@ static const struct intel_rapl_init_fun skl_rapl_init __initconst = { | |||
786 | }; | 787 | }; |
787 | 788 | ||
788 | static const struct x86_cpu_id rapl_cpu_match[] __initconst = { | 789 | static const struct x86_cpu_id rapl_cpu_match[] __initconst = { |
789 | X86_RAPL_MODEL_MATCH(42, snb_rapl_init), /* Sandy Bridge */ | 790 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_SANDYBRIDGE, snb_rapl_init), |
790 | X86_RAPL_MODEL_MATCH(45, snbep_rapl_init), /* Sandy Bridge-EP */ | 791 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_SANDYBRIDGE_X, snbep_rapl_init), |
791 | 792 | ||
792 | X86_RAPL_MODEL_MATCH(58, snb_rapl_init), /* Ivy Bridge */ | 793 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_IVYBRIDGE, snb_rapl_init), |
793 | X86_RAPL_MODEL_MATCH(62, snbep_rapl_init), /* IvyTown */ | 794 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_IVYBRIDGE_X, snbep_rapl_init), |
794 | 795 | ||
795 | X86_RAPL_MODEL_MATCH(60, hsw_rapl_init), /* Haswell */ | 796 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_HASWELL_CORE, hsw_rapl_init), |
796 | X86_RAPL_MODEL_MATCH(63, hsx_rapl_init), /* Haswell-Server */ | 797 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_HASWELL_X, hsw_rapl_init), |
797 | X86_RAPL_MODEL_MATCH(69, hsw_rapl_init), /* Haswell-Celeron */ | 798 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_HASWELL_ULT, hsw_rapl_init), |
798 | X86_RAPL_MODEL_MATCH(70, hsw_rapl_init), /* Haswell GT3e */ | 799 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_HASWELL_GT3E, hsw_rapl_init), |
799 | 800 | ||
800 | X86_RAPL_MODEL_MATCH(61, hsw_rapl_init), /* Broadwell */ | 801 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_BROADWELL_CORE, hsw_rapl_init), |
801 | X86_RAPL_MODEL_MATCH(71, hsw_rapl_init), /* Broadwell-H */ | 802 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_BROADWELL_GT3E, hsw_rapl_init), |
802 | X86_RAPL_MODEL_MATCH(79, hsx_rapl_init), /* Broadwell-Server */ | 803 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_BROADWELL_X, hsw_rapl_init), |
803 | X86_RAPL_MODEL_MATCH(86, hsx_rapl_init), /* Broadwell Xeon D */ | 804 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_BROADWELL_XEON_D, hsw_rapl_init), |
804 | 805 | ||
805 | X86_RAPL_MODEL_MATCH(87, knl_rapl_init), /* Knights Landing */ | 806 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNL, knl_rapl_init), |
806 | 807 | ||
807 | X86_RAPL_MODEL_MATCH(78, skl_rapl_init), /* Skylake */ | 808 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_SKYLAKE_MOBILE, skl_rapl_init), |
808 | X86_RAPL_MODEL_MATCH(94, skl_rapl_init), /* Skylake H/S */ | 809 | X86_RAPL_MODEL_MATCH(INTEL_FAM6_SKYLAKE_DESKTOP, skl_rapl_init), |
809 | {}, | 810 | {}, |
810 | }; | 811 | }; |
811 | 812 | ||