* [PATCH 1/2] perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake
@ 2020-11-25 21:37 kan.liang
2020-11-25 21:37 ` [PATCH 2/2] perf/x86/intel/lbr: Fix the return type of get_lbr_cycles() kan.liang
2020-12-09 18:44 ` [tip: perf/core] perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake tip-bot2 for Kan Liang
0 siblings, 2 replies; 4+ messages in thread
From: kan.liang @ 2020-11-25 21:37 UTC (permalink / raw)
To: peterz, mingo, linux-kernel; +Cc: eranian, ak, Kan Liang, stable
From: Kan Liang <kan.liang@linux.intel.com>
According to the event list from icelake_core_v1.09.json, the encoding
of the RTM_RETIRED.ABORTED event on Ice Lake should be,
"EventCode": "0xc9",
"UMask": "0x04",
"EventName": "RTM_RETIRED.ABORTED",
Correct the wrong encoding.
Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support")
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Cc: stable@vger.kernel.org
---
arch/x86/events/intel/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index ec503399c5df..c5aca399a46a 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -5321,7 +5321,7 @@ __init int intel_pmu_init(void)
mem_attr = icl_events_attrs;
td_attr = icl_td_events_attrs;
tsx_attr = icl_tsx_events_attrs;
- x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02);
+ x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xc9, .umask=0x04);
x86_pmu.lbr_pt_coexist = true;
intel_pmu_pebs_data_source_skl(pmem);
x86_pmu.update_topdown_event = icl_update_topdown_event;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] perf/x86/intel/lbr: Fix the return type of get_lbr_cycles()
2020-11-25 21:37 [PATCH 1/2] perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake kan.liang
@ 2020-11-25 21:37 ` kan.liang
2020-12-09 18:44 ` [tip: perf/core] " tip-bot2 for Kan Liang
2020-12-09 18:44 ` [tip: perf/core] perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake tip-bot2 for Kan Liang
1 sibling, 1 reply; 4+ messages in thread
From: kan.liang @ 2020-11-25 21:37 UTC (permalink / raw)
To: peterz, mingo, linux-kernel; +Cc: eranian, ak, Kan Liang, stable
From: Kan Liang <kan.liang@linux.intel.com>
The cycle count of a timed LBR is always 1 in perf record -D.
The cycle count is stored in the first 16 bits of the IA32_LBR_x_INFO
register, but the get_lbr_cycles() return Boolean type.
Use u16 to replace the Boolean type.
Fixes: 47125db27e47 ("perf/x86/intel/lbr: Support Architectural LBR")
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Cc: stable@vger.kernel.org
---
arch/x86/events/intel/lbr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c
index 1aadb253d296..21890dacfcfe 100644
--- a/arch/x86/events/intel/lbr.c
+++ b/arch/x86/events/intel/lbr.c
@@ -919,7 +919,7 @@ static __always_inline bool get_lbr_predicted(u64 info)
return !(info & LBR_INFO_MISPRED);
}
-static __always_inline bool get_lbr_cycles(u64 info)
+static __always_inline u16 get_lbr_cycles(u64 info)
{
if (static_cpu_has(X86_FEATURE_ARCH_LBR) &&
!(x86_pmu.lbr_timed_lbr && info & LBR_INFO_CYC_CNT_VALID))
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip: perf/core] perf/x86/intel/lbr: Fix the return type of get_lbr_cycles()
2020-11-25 21:37 ` [PATCH 2/2] perf/x86/intel/lbr: Fix the return type of get_lbr_cycles() kan.liang
@ 2020-12-09 18:44 ` tip-bot2 for Kan Liang
0 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Kan Liang @ 2020-12-09 18:44 UTC (permalink / raw)
To: linux-tip-commits
Cc: Stephane Eranian, Kan Liang, Peter Zijlstra (Intel),
stable, x86, linux-kernel
The following commit has been merged into the perf/core branch of tip:
Commit-ID: f8129cd958b395575e5543ce25a8434874b04d3a
Gitweb: https://git.kernel.org/tip/f8129cd958b395575e5543ce25a8434874b04d3a
Author: Kan Liang <kan.liang@linux.intel.com>
AuthorDate: Wed, 25 Nov 2020 13:37:20 -08:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 09 Dec 2020 17:08:58 +01:00
perf/x86/intel/lbr: Fix the return type of get_lbr_cycles()
The cycle count of a timed LBR is always 1 in perf record -D.
The cycle count is stored in the first 16 bits of the IA32_LBR_x_INFO
register, but the get_lbr_cycles() return Boolean type.
Use u16 to replace the Boolean type.
Fixes: 47125db27e47 ("perf/x86/intel/lbr: Support Architectural LBR")
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20201125213720.15692-2-kan.liang@linux.intel.com
---
arch/x86/events/intel/lbr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c
index 8961653..e2b0efc 100644
--- a/arch/x86/events/intel/lbr.c
+++ b/arch/x86/events/intel/lbr.c
@@ -919,7 +919,7 @@ static __always_inline bool get_lbr_predicted(u64 info)
return !(info & LBR_INFO_MISPRED);
}
-static __always_inline bool get_lbr_cycles(u64 info)
+static __always_inline u16 get_lbr_cycles(u64 info)
{
if (static_cpu_has(X86_FEATURE_ARCH_LBR) &&
!(x86_pmu.lbr_timed_lbr && info & LBR_INFO_CYC_CNT_VALID))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip: perf/core] perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake
2020-11-25 21:37 [PATCH 1/2] perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake kan.liang
2020-11-25 21:37 ` [PATCH 2/2] perf/x86/intel/lbr: Fix the return type of get_lbr_cycles() kan.liang
@ 2020-12-09 18:44 ` tip-bot2 for Kan Liang
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Kan Liang @ 2020-12-09 18:44 UTC (permalink / raw)
To: linux-tip-commits
Cc: Kan Liang, Peter Zijlstra (Intel), stable, x86, linux-kernel
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 46b72e1bf4fc571da0c29c6fb3e5b2a2107a4c26
Gitweb: https://git.kernel.org/tip/46b72e1bf4fc571da0c29c6fb3e5b2a2107a4c26
Author: Kan Liang <kan.liang@linux.intel.com>
AuthorDate: Wed, 25 Nov 2020 13:37:19 -08:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 09 Dec 2020 17:08:57 +01:00
perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake
According to the event list from icelake_core_v1.09.json, the encoding
of the RTM_RETIRED.ABORTED event on Ice Lake should be,
"EventCode": "0xc9",
"UMask": "0x04",
"EventName": "RTM_RETIRED.ABORTED",
Correct the wrong encoding.
Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support")
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20201125213720.15692-1-kan.liang@linux.intel.com
---
arch/x86/events/intel/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 546cc89..6c0d18f 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -5466,7 +5466,7 @@ __init int intel_pmu_init(void)
mem_attr = icl_events_attrs;
td_attr = icl_td_events_attrs;
tsx_attr = icl_tsx_events_attrs;
- x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xca, .umask=0x02);
+ x86_pmu.rtm_abort_event = X86_CONFIG(.event=0xc9, .umask=0x04);
x86_pmu.lbr_pt_coexist = true;
intel_pmu_pebs_data_source_skl(pmem);
x86_pmu.update_topdown_event = icl_update_topdown_event;
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-09 18:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 21:37 [PATCH 1/2] perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake kan.liang
2020-11-25 21:37 ` [PATCH 2/2] perf/x86/intel/lbr: Fix the return type of get_lbr_cycles() kan.liang
2020-12-09 18:44 ` [tip: perf/core] " tip-bot2 for Kan Liang
2020-12-09 18:44 ` [tip: perf/core] perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake tip-bot2 for Kan Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).