Skip to content

Commit 13301c6

Browse files
olsajiriIngo Molnar
authored andcommitted
perf/x86/intel/pt: Fix base for single entry topa
Jan reported failing ltp test for PT: https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/tracing/pt_test/pt_test.c It looks like the reason is this new commit added in this v5.4 merge window: 38bb8d7 ("perf/x86/intel/pt: Split ToPA metadata and page layout") which did not keep the TOPA_SHIFT for entry base. Add it back. Reported-by: Jan Stancek <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vince Weaver <[email protected]> Fixes: 38bb8d7 ("perf/x86/intel/pt: Split ToPA metadata and page layout") Link: https://lkml.kernel.org/r/[email protected] [ Minor changelog edits. ] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 4f5cafb commit 13301c6

File tree

1 file changed

+1
-1
lines changed
  • arch/x86/events/intel

1 file changed

+1
-1
lines changed

arch/x86/events/intel/pt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ static struct topa *topa_alloc(int cpu, gfp_t gfp)
627627
* link as the 2nd entry in the table
628628
*/
629629
if (!intel_pt_validate_hw_cap(PT_CAP_topa_multiple_entries)) {
630-
TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p);
630+
TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p) >> TOPA_SHIFT;
631631
TOPA_ENTRY(&tp->topa, 1)->end = 1;
632632
}
633633

0 commit comments

Comments
 (0)