]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.14.25/perf-x86-intel-use-proper-dtlb-load-misses-event-on-ivybridge.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.14.25 / perf-x86-intel-use-proper-dtlb-load-misses-event-on-ivybridge.patch
CommitLineData
be3a75e0
GKH
1From 1996388e9f4e3444db8273bc08d25164d2967c21 Mon Sep 17 00:00:00 2001
2From: Vince Weaver <vincent.weaver@maine.edu>
3Date: Mon, 14 Jul 2014 15:33:25 -0400
4Subject: perf/x86/intel: Use proper dTLB-load-misses event on IvyBridge
5
6From: Vince Weaver <vincent.weaver@maine.edu>
7
8commit 1996388e9f4e3444db8273bc08d25164d2967c21 upstream.
9
10This was discussed back in February:
11
12 https://lkml.org/lkml/2014/2/18/956
13
14But I never saw a patch come out of it.
15
16On IvyBridge we share the SandyBridge cache event tables, but the
17dTLB-load-miss event is not compatible. Patch it up after
18the fact to the proper DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK
19
20Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
21Signed-off-by: Peter Zijlstra <peterz@infradead.org>
22Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
23Cc: Linus Torvalds <torvalds@linux-foundation.org>
24Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1407141528200.17214@vincent-weaver-1.umelst.maine.edu
25Signed-off-by: Ingo Molnar <mingo@kernel.org>
26Cc: Hou Pengyang <houpengyang@huawei.com>
27Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28
29---
30 arch/x86/kernel/cpu/perf_event_intel.c | 3 +++
31 1 file changed, 3 insertions(+)
32
33--- a/arch/x86/kernel/cpu/perf_event_intel.c
34+++ b/arch/x86/kernel/cpu/perf_event_intel.c
35@@ -2475,6 +2475,9 @@ __init int intel_pmu_init(void)
36 case 62: /* IvyBridge EP */
37 memcpy(hw_cache_event_ids, snb_hw_cache_event_ids,
38 sizeof(hw_cache_event_ids));
39+ /* dTLB-load-misses on IVB is different than SNB */
40+ hw_cache_event_ids[C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = 0x8108; /* DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK */
41+
42 memcpy(hw_cache_extra_regs, snb_hw_cache_extra_regs,
43 sizeof(hw_cache_extra_regs));
44