linux/drivers/hwtracing/coresight
Suzuki K Poulose 5f6fd1aa8c coresight: etm4x: Use Trace Filtering controls dynamically
The Trace Filtering support (FEAT_TRF) ensures that the ETM
can be prohibited from generating any trace for a given EL.
This is much stricter knob, than the TRCVICTLR exception level
masks, which doesn't prevent the ETM from generating Context
packets for an "excluded" EL. At the moment, we do a onetime
enable trace at user and kernel and leave it untouched for the
kernel life time. This implies that the ETM could potentially
generate trace packets containing the kernel addresses, and
thus leaking the kernel virtual address in the trace.

This patch makes the switch dynamic, by honoring the filters
set by the user and enforcing them in the TRFCR controls.
We also rename the cpu_enable_tracing() appropriately to
cpu_detect_trace_filtering() and the drvdata member
trfc => trfcr to indicate the "value" of the TRFCR_EL1.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Al Grant <al.grant@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20210914102641.1852544-3-suzuki.poulose@arm.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2021-10-27 11:45:18 -06:00
..
coresight-catu.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-catu.h coresight: tmc-etr: Add function to register catu ops 2020-09-28 19:47:42 +02:00
coresight-cfg-afdo.c coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-cfg-preload.c coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-cfg-preload.h coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-config.c coresight: config: Add configuration and feature generic functions 2021-08-18 22:33:27 +02:00
coresight-config.h coresight: syscfg: Add API to activate and enable configurations 2021-08-18 22:33:28 +02:00
coresight-core.c coresight: syscfg: Initial coresight system configuration 2021-08-18 22:33:27 +02:00
coresight-cpu-debug.c coresight: cpu-debug: Control default behavior via Kconfig 2021-10-27 11:44:30 -06:00
coresight-cti-core.c coresight: cti: Correct the parameter for pm_runtime_put 2021-10-27 11:44:26 -06:00
coresight-cti-platform.c coresight: cti: Reduce scope for the variable 'cs_fwnode' in cti_plat_create_connection() 2021-02-04 17:00:32 +01:00
coresight-cti-sysfs.c coresight: cti: Initialize dynamic sysfs attributes 2020-10-29 20:10:25 +01:00
coresight-cti.h coresight: Include required headers in C files 2020-05-19 16:31:18 +02:00
coresight-etb10.c coresight: Update comments for removing cs_etm_find_snapshot() 2021-10-27 11:44:50 -06:00
coresight-etm3x-core.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-etm3x-sysfs.c coresight: etm: Clean up device specific data 2019-06-19 20:29:14 +02:00
coresight-etm4x-cfg.c coresight: etm4x: Add complex configuration handlers to etmv4 2021-08-18 22:33:28 +02:00
coresight-etm4x-cfg.h coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-etm4x-core.c coresight: etm4x: Use Trace Filtering controls dynamically 2021-10-27 11:45:18 -06:00
coresight-etm4x-sysfs.c coresight: etm4x: Add complex configuration handlers to etmv4 2021-08-18 22:33:28 +02:00
coresight-etm4x.h coresight: etm4x: Use Trace Filtering controls dynamically 2021-10-27 11:45:18 -06: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 coresight: Don't immediately close events that are run on invalid CPU/sink combos 2021-10-27 11:45:01 -06:00
coresight-etm-perf.h coresight: etm-perf: Update to activate selected configuration 2021-08-18 22:33:28 +02:00
coresight-etm.h coresight: etm: Clean up device specific data 2019-06-19 20:29:14 +02:00
coresight-funnel.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-platform.c coresight: Do not scan for graph if none is present 2021-04-06 16:05:37 -06:00
coresight-priv.h coresight: core: Add support for dedicated percpu sinks 2021-04-06 16:05:38 -06:00
coresight-replicator.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-self-hosted-trace.h coresight: etm4x: Use Trace Filtering controls dynamically 2021-10-27 11:45:18 -06:00
coresight-stm.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-syscfg-configfs.c coresight: syscfg: Add initial configfs support 2021-08-18 22:33:28 +02:00
coresight-syscfg-configfs.h coresight: syscfg: Add initial configfs support 2021-08-18 22:33:28 +02:00
coresight-syscfg.c coresight: syscfg: Fix compiler warning 2021-09-14 09:03:16 +02:00
coresight-syscfg.h coresight: syscfg: Add initial configfs support 2021-08-18 22:33:28 +02:00
coresight-sysfs.c coresight: Export global symbols 2020-09-28 19:47:40 +02:00
coresight-tmc-core.c coresight: tmc: Configure AXI write burst size 2021-10-27 11:44:34 -06:00
coresight-tmc-etf.c coresight: Update comments for removing cs_etm_find_snapshot() 2021-10-27 11:44:50 -06:00
coresight-tmc-etr.c coresight: tmc-etr: Speed up for bounce buffer in flat mode 2021-10-27 11:44:52 -06:00
coresight-tmc.h coresight: tmc: Configure AXI write burst size 2021-10-27 11:44:34 -06:00
coresight-tpiu.c Merge branch 'devel-stable' of git://git.armlinux.org.uk/~rmk/linux-arm into char-misc-next 2021-02-05 11:15:43 +01:00
coresight-trbe.c coresight: trbe: Fix return value check in arm_trbe_register_coresight_cpu() 2021-04-13 09:46:27 -06:00
coresight-trbe.h coresight: sink: Add TRBE driver 2021-04-06 16:05:38 -06:00
Kconfig coresight: cpu-debug: Control default behavior via Kconfig 2021-10-27 11:44:30 -06:00
Makefile coresight: syscfg: Add initial configfs support 2021-08-18 22:33:28 +02:00