Re: [PATCH] kselftest/arm64: Add coresight test

2024-07-19 Thread James Clark
+cc linux-kselftest@vger.kernel.org On 19/07/2024 11:21 am, Jeremy Szu wrote: James Clark 於 7/17/24 10:48 PM 寫道: On 16/07/2024 3:06 am, Jeremy Szu wrote: Hi James, Thank you for your reply. James Clark 於 7/12/24 5:01 PM 寫道: On 11/07/2024 7:03 pm, Catalin Marinas wrote: On Wed, Jul

Re: [PATCH v1 12/13] tools headers: Sync compiler.h headers

2024-03-11 Thread James Clark
On 10/03/2024 02:05, Ian Rogers wrote: > compiler.h - synced from include/linux/compiler.h, guards were > added to definitions to avoid redefinition of macros > in libc. ftrace, CONFIG_OBJTOOL and kentry logic was removed as > redundant. > Hi Ian, This commit breaks the Arm build (and cros

Re: [PATCH v7 05/11] arm64: perf: Include threshold control fields in PMEVTYPER mask

2023-12-15 Thread James Clark
On 15/12/2023 12:08, Uwe Kleine-König wrote: > Hello, > > On Mon, Dec 11, 2023 at 04:13:17PM +0000, James Clark wrote: >> FEAT_PMUv3_TH (Armv8.8) adds two new fields to PMEVTYPER, so include >> them in the mask. These aren't writable on 32 bit kernels as they are

[PATCH v7 11/11] Documentation: arm64: Document the PMU event counting threshold feature

2023-12-11 Thread James Clark
Add documentation for the new Perf event open parameters and the threshold_max capability file. Reviewed-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose Acked-by: Namhyung Kim Signed-off-by: James Clark --- Documentation/arch/arm64/perf.rst | 72 +++ 1 file

[PATCH v7 10/11] arm64: perf: Add support for event counting threshold

2023-12-11 Thread James Clark
tems. Bits higher than 32 now need to be written into PMEVTYPER, so armv8pmu_write_evtype() has to be updated to take an unsigned long value rather than u32 which gives the correct behavior on both aarch32 and 64. Signed-off-by: James Clark --- drivers/perf/arm_pmuv3.c | 79 ++

[PATCH v7 09/11] arm: pmu: Move error message and -EOPNOTSUPP to individual PMUs

2023-12-11 Thread James Clark
-EPERM or -EINVAL always get converted to -EOPNOTSUPP, so replace them. This will allow __hw_perf_event_init() to return a different code or not print that particular message for a different error in the next commit. Signed-off-by: James Clark --- arch/arm/kernel/perf_event_v7.c | 6

[PATCH v7 08/11] KVM: selftests: aarch64: Update tools copy of arm_pmuv3.h

2023-12-11 Thread James Clark
Now that ARMV8_PMU_PMCR_N is made with GENMASK, update usages to treat it as a pre-shifted mask. Signed-off-by: James Clark --- tools/include/perf/arm_pmuv3.h| 43 +++ .../kvm/aarch64/vpmu_counter_access.c | 5 +-- 2 files changed, 28 insertions(+), 20

[PATCH v7 07/11] perf/arm_dmc620: Remove duplicate format attribute #defines

2023-12-11 Thread James Clark
These were copied from the SPE driver, but now they're in the arm_pmu.h header so delete them and use the header instead. Signed-off-by: James Clark --- drivers/perf/arm_dmc620_pmu.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers

[PATCH v7 06/11] arm: pmu: Share user ABI format mechanism with SPE

2023-12-11 Thread James Clark
this will also be used now. Signed-off-by: James Clark --- drivers/perf/arm_pmuv3.c | 21 - drivers/perf/arm_spe_pmu.c | 22 -- include/linux/perf/arm_pmu.h | 22 ++ 3 files changed, 38 insertions(+), 27 deletions(-) diff --git a

[PATCH v7 05/11] arm64: perf: Include threshold control fields in PMEVTYPER mask

2023-12-11 Thread James Clark
tform without resulting in circular includes or #ifdefs inline in the code. For that reason the ARMV8_PMU_EVTYPE_MASK definition has been removed and the mask is constructed programmatically. Reviewed-by: Suzuki K Poulose Reviewed-by: Anshuman Khandual Signed-off-by: James Clark --- drivers/perf/arm_

[PATCH v7 04/11] arm: perf: Convert remaining fields to use GENMASK

2023-12-11 Thread James Clark
Convert the remaining fields to use either GENMASK or be built from other fields. These all already started at bit 0 so don't need a code change for the lack of _SHIFT. Signed-off-by: James Clark --- drivers/perf/arm_pmuv3.c | 2 +- include/linux/perf/arm_pmuv3.h

[PATCH v7 03/11] arm: perf: Use GENMASK for PMMIR fields

2023-12-11 Thread James Clark
This is so that FIELD_GET and FIELD_PREP can be used and that the fields are in a consistent format to arm64/tools/sysreg Signed-off-by: James Clark --- drivers/perf/arm_pmuv3.c | 8 +++- include/linux/perf/arm_pmuv3.h | 9 +++-- 2 files changed, 6 insertions(+), 11 deletions

[PATCH v7 02/11] arm: perf/kvm: Use GENMASK for ARMV8_PMU_PMCR_N

2023-12-11 Thread James Clark
This is so that FIELD_GET and FIELD_PREP can be used and that the fields are in a consistent format to arm64/tools/sysreg Signed-off-by: James Clark --- arch/arm64/kvm/pmu-emul.c | 8 +++- arch/arm64/kvm/sys_regs.c | 4 ++-- drivers/perf/arm_pmuv3.c | 4 ++-- include/linux

[PATCH v7 01/11] arm: perf: Remove inlines from arm_pmuv3.c

2023-12-11 Thread James Clark
These are all static and in one compilation unit so the inline has no effect on the binary. Except if FTRACE is enabled, then 3 functions which were already not inlined now get the nops added which allows them to be traced. Signed-off-by: James Clark --- drivers/perf/arm_pmuv3.c | 46

[PATCH v7 00/11] arm64: perf: Add support for event counting threshold

2023-12-11 Thread James Clark
old=1,threshold_compare=2/ -- true 6329 dtlb_walk/threshold=1,threshold_compare=2/ James Clark (11): arm: perf: Remove inlines from arm_pmuv3.c arm: perf/kvm: Use GENMASK for ARMV8_PMU_PMCR_N arm: perf: Use GENMASK for PMMIR fields arm: perf: Convert remaining fields to use GENMASK