The patch removing the feature-sync-compare-and-swap feature detection
didn't remove the call to main_test_sync_compare_and_swap(), making the
'test-all' case fail an all the feature tests to be performed
individually:
$ cat /tmp/build/perf/feature/test-all.make.output
In file included from test-all.c:18:
test-libpython-version.c:5:10: error: #error
5 | #error
| ^~~~~
test-all.c: In function ‘main’:
test-all.c:203:9: error: implicit declaration of function ‘main_test_sync_compare_and_swap’ [-Werror=implicit-function-declaration]
203 | main_test_sync_compare_and_swap(argc, argv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
$
Fix it, now to figure out what is that test-libpython-version.c
problem...
Fixes: 60fa754b2a5a4e0c ("tools: Remove feature-sync-compare-and-swap feature detection")
Cc: Jiri Olsa <jolsa(a)redhat.com>
Cc: Leo Yan <leo.yan(a)linaro.org>
Cc: Mark Rutland <mark.rutland(a)arm.com>
Cc: Mathieu Poirier <mathieu.poirier(a)linaro.org>
Cc: Mike Leach <mike.leach(a)linaro.org>
Cc: Namhyung Kim <namhyung(a)kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
---
tools/build/feature/test-all.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index 9204395272912c13..0b243ce842be3383 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -200,7 +200,6 @@ int main(int argc, char *argv[])
main_test_timerfd();
main_test_stackprotector_all();
main_test_libdw_dwarf_unwind();
- main_test_sync_compare_and_swap(argc, argv);
main_test_zlib();
main_test_pthread_attr_setaffinity_np();
main_test_pthread_barrier();
--
2.31.1
1) API updated to allow dynamic load and unload of configurations and
features. Dependency management between loaded sets is added.
2) New configuration and feature sets can be added using a loadable module.
An example in /samples/coresight is provided to demonstrate this.
3) configfs can be used to activate a configuration which will then be used
when controlling tracing using sysfs.
Applies and tested on coresight/next - which is 5.15-rc1
Changes since v1:
a) Original set split to divide related changes into smaller sets.
Removed RFC flag.
b) Revised config activation for sysfs to simplify common function.
(patch 4).
c) Minor changes requested by Mathieu added.
Mike Leach (5):
coresight: syscfg: Update API to allow dynamic load and unload
coresight: syscfg: Update load API for config loadable modules
coresight: syscfg: Example CoreSight configuration loadable module
coresight: configfs: Allow configfs to activate configuration
Documentation: coresight: Update coresight configuration docs
.../trace/coresight/coresight-config.rst | 19 ++
MAINTAINERS | 1 +
.../coresight/coresight-cfg-preload.c | 9 +-
.../hwtracing/coresight/coresight-config.h | 9 +-
.../coresight/coresight-etm4x-core.c | 11 +-
.../coresight/coresight-syscfg-configfs.c | 87 +++++
.../coresight/coresight-syscfg-configfs.h | 4 +
.../hwtracing/coresight/coresight-syscfg.c | 315 ++++++++++++++++--
.../hwtracing/coresight/coresight-syscfg.h | 39 ++-
samples/Kconfig | 9 +
samples/Makefile | 1 +
samples/coresight/Makefile | 4 +
samples/coresight/coresight-cfg-sample.c | 73 ++++
13 files changed, 546 insertions(+), 35 deletions(-)
create mode 100644 samples/coresight/Makefile
create mode 100644 samples/coresight/coresight-cfg-sample.c
--
2.17.1
If a profiling program runs in a non-root PID namespace, if CoreSight
driver enables contextID tracing, it can lead to mismatching issue
between the context ID in hardware trace data and the allocated PID in
the non-root namespace.
CoreSight driver has tried to address this issue for the contextID
related interfaces under sysfs, but it misses other parts: it doesn't
prevent user to set VMID (virtual contextID) for kernel runs in EL2 with
VHE, and furthermore, it misses to handle the perf mode when the
profiling tool (e.g. perf) doesn't run in root PID namespace.
For this reason, this patch series is to correct contextID tracing for
non-root namespace.
Patch 01 is to use spinlock to protect reading virtual context ID
comparator.
Patch 02 corrects the virtual contextID tracing for non-root PID
namespace.
Patch 03/04 are used to fix the contextID tracing for perf mode.
I only verified this patch series on Juno board in the root PID
namespace and confirmed the patches don't introduce any regression for
root PID namespace.
Leo Yan (4):
coresight: etm4x: Add lock for reading virtual context ID comparator
coresight: etm4x: Don't use virtual contextID for non-root PID
namespace
coresight: etm4x: Don't trace contextID for non-root namespace in perf
mode
coresight: etm3x: Don't trace contextID for non-root namespace in perf
mode
.../coresight/coresight-etm3x-core.c | 4 +++
.../coresight/coresight-etm4x-core.c | 10 +++++--
.../coresight/coresight-etm4x-sysfs.c | 30 +++++++++++++++++++
3 files changed, 42 insertions(+), 2 deletions(-)
--
2.25.1
On Fri, Nov 12, 2021 at 05:10:38PM +0800, Jinlong wrote:
> On Fri, Nov 12, 2021 at 04:42:31PM +0800, Jinlong wrote:
> > [....]
> >
> > > > &tpdm_attr_grp,
> > > > > + &tpdm_bc_attr_grp,
> > > >
> > > > It is quite tedious to review all these options at the same time as the core
> > > > drivers. I suggest to concentrate on the base functionality for now. When that
> > > > is merged we can add configuration options such as these.
> > > >
> > > > I am out of time for this patchset and as such will not review the remaining
> > > > patches - those will have to wait for another iteration.
> > > >
> > > > Thanks,
> > > > Mathieu
> > >
> > >
> > > Thank your for all the comments.
> > > We will update the patches.
> > >
> > > Thanks
> > > Jinlong Mao
> > >
> >
>
> Correct the typo.
>
> Hi Mathieu,
>
> We will reduce the code changes.
> There will be code changes below for next version:
>
> 1. coresight: add support to enable more coresight paths
> 2. Basic function for TPDM(only enable/disable functions)
> 3. TPDA driver
>
> Is that ok for you ?
Yes, that sounds much better.
Regards,
Mathieu
> >
> > > >
> > > > > NULL,
> > > > > };
> > > > >
> > > > > --
> > > > > 2.17.1
> > > > >
Sent as a splitted re-roll of patchset [1] to keep the patches more
semantically grouped. The patches themselves have been tested and
reviewed in the previous submission already.
Changes since v1:
- Sent as a separate patchset.
- Added acme to the recipients list as I forgot to include him in [1].
[1] https://lore.kernel.org/all/20210916154635.1525-1-german.gomez@arm.com/
Andrew Kilroy (2):
perf cs-etm: Print size using consistent format
perf arm-spe: Print size using consistent format
tools/perf/util/arm-spe.c | 2 +-
tools/perf/util/cs-etm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.25.1
On 2021/11/5 9:36, Randy Dunlap wrote:
> On 11/4/21 6:20 PM, Qi Liu wrote:
>> diff --git a/drivers/hwtracing/coresight/ultrasoc/Kconfig
>> b/drivers/hwtracing/coresight/ultrasoc/Kconfig
>> new file mode 100644
>> index 000000000000..c18c25bf9df3
>> --- /dev/null
>> +++ b/drivers/hwtracing/coresight/ultrasoc/Kconfig
>> @@ -0,0 +1,12 @@
>> +# SPDX-License-Identifier: MIT
>> +#
>> +# ultrasoc configuration
>> +#
>> +config ULTRASOC_SMB
>> + tristate "Ultrasoc system memory buffer drivers"
>> + depends on ARM64 && CORESIGHT
>
> The "depends" line should be indented with a tab instead of spaces...
>
ah, yes, my editor might be set incorrectly, thanks for the reminder,
I'll correct it next time.
Qi
>> + help
>> + This enables support for the Ultrasoc system memory buffer
>> + driver that is responsible for receiving the trace data from
>> + Coresight ETM devices and storing them to a system buffer
>> + respectively.
>
>
The following changes since commit 561ced0bb90a4be298b7db5fb54f29731d74a3f6:
arm64: errata: Enable TRBE workaround for write to out-of-range address (2021-10-27 11:46:06 -0600)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/coresight/linux.git tags/coresight-fixes-v5.16
for you to fetch changes up to 20b02fe36530a1e48dde73c80b882ae276346ea3:
arm64: cpufeature: Export this_cpu_has_cap helper (2021-11-04 10:46:21 -0600)
---------------------------------------------------------------
coresight: Fix for v5.16
This fix enables to compile the TRBE driver as a module by
exporting function this_cpu_has_cap().
Signed-off-by: Mathieu Poirier <mathieu.poirier(a)linaro.org>
----------------------------------------------------------------
Arnd Bergmann (1):
arm64: cpufeature: Export this_cpu_has_cap helper
arch/arm64/kernel/cpufeature.c | 1 +
1 file changed, 1 insertion(+)