mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
8a1065127d
Add a minimal infrastructure to keep track of the errata affecting the given TRBE instance. Given that we have heterogeneous CPUs, we have to manage the list per-TRBE instance to be able to apply the work around as needed. Thus we will need to check if individual CPUs are affected by the erratum. We rely on the arm64 errata framework for the actual description and the discovery of a given erratum, to keep the Erratum work around at a central place and benefit from the code and the advertisement from the kernel. Though we could reuse the "this_cpu_has_cap()" to apply an erratum work around, it is a bit of a heavy operation, as it must go through the "erratum" detection check on the CPU every time it is called (e.g, scanning through a table of affected MIDRs). Since we need to do this check for every session, may be multiple times (depending on the wrok around), we could save the cycles by caching the affected errata per-CPU instance in the per-CPU struct trbe_cpudata. Since we are only interested in the errata affecting the TRBE driver, we only need to track a very few of them per-CPU. Thus we use a local mapping of the CPUCAP for the erratum to avoid bloating up a bitmap for trbe_cpudata. i.e, each arm64 TRBE erratum bit is assigned a "index" within the driver to track. Each trbe instance updates the list of affected erratum at probe time on the CPU. This makes sure that we can easily access the list of errata on a given TRBE instance without much overhead. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20211019163153.3692640-10-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> |
||
---|---|---|
.. | ||
coresight-catu.c | ||
coresight-catu.h | ||
coresight-cfg-afdo.c | ||
coresight-cfg-preload.c | ||
coresight-cfg-preload.h | ||
coresight-config.c | ||
coresight-config.h | ||
coresight-core.c | ||
coresight-cpu-debug.c | ||
coresight-cti-core.c | ||
coresight-cti-platform.c | ||
coresight-cti-sysfs.c | ||
coresight-cti.h | ||
coresight-etb10.c | ||
coresight-etm-cp14.c | ||
coresight-etm-perf.c | ||
coresight-etm-perf.h | ||
coresight-etm.h | ||
coresight-etm3x-core.c | ||
coresight-etm3x-sysfs.c | ||
coresight-etm4x-cfg.c | ||
coresight-etm4x-cfg.h | ||
coresight-etm4x-core.c | ||
coresight-etm4x-sysfs.c | ||
coresight-etm4x.h | ||
coresight-funnel.c | ||
coresight-platform.c | ||
coresight-priv.h | ||
coresight-replicator.c | ||
coresight-self-hosted-trace.h | ||
coresight-stm.c | ||
coresight-syscfg-configfs.c | ||
coresight-syscfg-configfs.h | ||
coresight-syscfg.c | ||
coresight-syscfg.h | ||
coresight-sysfs.c | ||
coresight-tmc-core.c | ||
coresight-tmc-etf.c | ||
coresight-tmc-etr.c | ||
coresight-tmc.h | ||
coresight-tpiu.c | ||
coresight-trbe.c | ||
coresight-trbe.h | ||
Kconfig | ||
Makefile |