linux_dsm_epyc7002/drivers/hwtracing/coresight
Alexander Shishkin c60f83b813 perf, pt, coresight: Fix address filters for vmas with non-zero offset
Currently, the address range calculation for file-based filters works as
long as the vma that maps the matching part of the object file starts
from offset zero into the file (vm_pgoff==0). Otherwise, the resulting
filter range would be off by vm_pgoff pages. Another related problem is
that in case of a partially matching vma, that is, a vma that matches
part of a filter region, the filter range size wouldn't be adjusted.

Fix the arithmetics around address filter range calculations, taking
into account vma offset, so that the entire calculation is done before
the filter configuration is passed to the PMU drivers instead of having
those drivers do the final bit of arithmetics.

Based on the patch by Adrian Hunter <adrian.hunter.intel.com>.

Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Tested-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Fixes: 375637bc52 ("perf/core: Introduce address range filtering")
Link: http://lkml.kernel.org/r/20190215115655.63469-3-alexander.shishkin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-02-22 16:52:07 -03:00
..
coresight-catu.c coresight: catu: Claim device before use 2018-09-25 20:09:19 +02:00
coresight-catu.h coresight: catu: Plug in CATU as a backend for ETR buffer 2018-07-15 13:52:59 +02:00
coresight-cpu-debug.c coresight: Remove %px for printing pcsr value 2018-05-14 16:20:00 +02:00
coresight-dynamic-replicator.c coresight: dynamic-replicator: Claim device for use 2018-09-25 20:09:19 +02:00
coresight-etb10.c coresight: etb10: Add support for CLAIM tag 2018-12-06 15:41:55 +01:00
coresight-etm3x-sysfs.c coresight: etm3x: Don't use contextID with PID namespaces 2018-07-15 13:52:56 +02:00
coresight-etm3x.c coresight: etm3x: Release CLAIM tag when operated from perf 2018-12-06 15:41:55 +01:00
coresight-etm4x-sysfs.c coresight: etm4x: Don't use contextID with PID namespaces 2018-07-15 13:52:56 +02:00
coresight-etm4x.c coresight: etmx: Claim devices before use 2018-09-25 20:09:19 +02:00
coresight-etm4x.h coresight: etm4x: Don't use contextID with PID namespaces 2018-07-15 13:52:56 +02:00
coresight-etm-cp14.c coresight: Moving framework and drivers to SPDX identifier 2018-05-14 16:19:59 +02:00
coresight-etm-perf.c perf, pt, coresight: Fix address filters for vmas with non-zero offset 2019-02-22 16:52:07 -03:00
coresight-etm-perf.h coresight: perf: Add "sinks" group to PMU directory 2019-02-06 10:00:39 -03:00
coresight-etm.h coresight: etm3x: Don't use contextID with PID namespaces 2018-07-15 13:52:56 +02:00
coresight-funnel.c coresight: funnel: Claim devices before use 2018-09-25 20:09:19 +02:00
coresight-priv.h coresight: Use event attributes for sink selection 2019-02-06 10:00:39 -03:00
coresight-replicator.c coresight: Convert driver messages to dev_dbg 2018-09-25 20:09:17 +02:00
coresight-stm.c coresight: fix spelling mistake "deffered" -> "deferred" 2018-12-06 15:41:56 +01:00
coresight-tmc-etf.c coresight: etf: Release CLAIM tag after disabling the HW 2018-12-06 15:41:55 +01:00
coresight-tmc-etr.c coreisght: tmc: Claim device before use 2018-09-25 20:21:02 +02:00
coresight-tmc.c coresight: Convert driver messages to dev_dbg 2018-09-25 20:09:17 +02:00
coresight-tmc.h coresight: etm-perf: Add support for ETR backend 2018-09-25 20:09:18 +02:00
coresight-tpiu.c coresight: perf: Remove set_buffer call back 2018-09-25 20:09:18 +02:00
coresight.c coresight: Use event attributes for sink selection 2019-02-06 10:00:39 -03:00
Kconfig coresight: Introduce support for Coresight Address Translation Unit 2018-07-15 13:52:58 +02:00
Makefile coresight: Introduce support for Coresight Address Translation Unit 2018-07-15 13:52:58 +02:00
of_coresight.c coresight: Remove redundant null pointer check before of_node_put and put_device 2018-09-25 20:09:19 +02:00