Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab03429a authored by Alexander Shishkin's avatar Alexander Shishkin Committed by Vegard Nossum
Browse files

perf/x86/intel/pt: Use pointer arithmetics instead in ToPA entry calculation



[ Upstream commit 539f7c26b41d4ed7d88dd9756de3966ae7ca07b4 ]

Currently, pt_buffer_reset_offsets() calculates the current ToPA entry by
casting pointers to addresses and performing ungainly subtractions and
divisions instead of a simpler pointer arithmetic, which would be perfectly
applicable in that case. Fix that.

Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/20190821124727.73310-4-alexander.shishkin@linux.intel.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Stable-dep-of: ad97196379d0 ("perf/x86/intel/pt: Fix a topa_entry base address calculation")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit 67968b8c7603007751f140f3f9f8aa8e64fc26b2)
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
parent 2de7be6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment