All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/x86/intel/pt: Fix base for single entry topa
@ 2019-10-19 22:07 Jiri Olsa
  2019-10-20 12:44 ` [tip: perf/urgent] " tip-bot2 for Jiri Olsa
  2019-10-21  6:37 ` [PATCH] " Alexander Shishkin
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Olsa @ 2019-10-19 22:07 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Jan Stancek, lkml, Ingo Molnar, Alexander Shishkin,
	Arnaldo Carvalho de Melo, Andi Kleen, Michael Petlan

Jan reported failing ltp test for pt. It looks like the reason
is commit 38bb8d77d0b9, that did not keep the TOPA_SHIFT for
entry base, adding it back.

[1] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/tracing/pt_test/pt_test.c

Reported-by: Jan Stancek <jstancek@redhat.com>
Fixes: 38bb8d77d0b9 ("perf/x86/intel/pt: Split ToPA metadata and page layout")
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
 arch/x86/events/intel/pt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
index 74e80ed9c6c4..05e43d0f430b 100644
--- a/arch/x86/events/intel/pt.c
+++ b/arch/x86/events/intel/pt.c
@@ -627,7 +627,7 @@ static struct topa *topa_alloc(int cpu, gfp_t gfp)
 	 * link as the 2nd entry in the table
 	 */
 	if (!intel_pt_validate_hw_cap(PT_CAP_topa_multiple_entries)) {
-		TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p);
+		TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p) >> TOPA_SHIFT;
 		TOPA_ENTRY(&tp->topa, 1)->end = 1;
 	}
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-21  6:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-19 22:07 [PATCH] perf/x86/intel/pt: Fix base for single entry topa Jiri Olsa
2019-10-20 12:44 ` [tip: perf/urgent] " tip-bot2 for Jiri Olsa
2019-10-21  6:37 ` [PATCH] " Alexander Shishkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.