On 13/01/2025 3:28 pm, Marc Zyngier wrote:
> On Mon, 13 Jan 2025 15:07:21 +0000,
> Mark Brown <broonie(a)kernel.org> wrote:
>>
>> [1 <text/plain; us-ascii (quoted-printable)>]
>> On Mon, Jan 06, 2025 at 02:24:37PM +0000, James Clark wrote:
>>> From: James Clark <james.clark(a)arm.com>
>>>
>>> Created with the following:
>>>
>>> cp include/linux/kasan-tags.h tools/include/linux/
>>> cp arch/arm64/include/asm/sysreg.h tools/arch/arm64/include/asm/
>>>
>>> Update the tools copy of sysreg.h so that the next commit to add a new
>>> register doesn't have unrelated changes in it. Because the new version
>>> of sysreg.h includes kasan-tags.h, that file also now needs to be copied
>>> into tools.
>>
>> This breaks the build of the KVM selftests:
>>
>> aarch64/aarch32_id_regs.c:150:16: error: use of undeclared identifier 'ID_AA64PFR0_EL1_ELx_64BIT_ONLY'
>> 150 | return el0 == ID_AA64PFR0_EL1_ELx_64BIT_ONLY;
>> | ^
>> 1 warning and 1 error generated.
>>
>> since it's pulled over the changes in 056600ff7330 ("arm64/cpufeature:
>> Replace custom macros with fields from ID_AA64PFR0_EL1") but not updated
>> the test to reflect this.
>
> Thanks for the heads up. I've stashed a fix on top, which hopefully
> will be in next tomorrow.
>
> M.
>
Oops sorry about that. I only tested the Perf build and hadn't done the
self tests for a few versions.
Thanks for making the fix.
On 12/01/2025 12:49 pm, Marc Zyngier wrote:
> On Tue, 07 Jan 2025 11:32:41 +0000,
> James Clark <james.clark(a)linaro.org> wrote:
>>
>> From: James Clark <james.clark(a)arm.com>
>>
>> There are a few entries particularly at the end of the file that aren't
>> in order. To avoid confusion, add a comment that might help new entries
>> to be added in the right place.
>>
>> Reviewed-by: Mark Brown <broonie(a)kernel.org>
>> Signed-off-by: James Clark <james.clark(a)arm.com>
>> Signed-off-by: James Clark <james.clark(a)linaro.org>
>> ---
>> arch/arm64/tools/sysreg | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
>> index b081b54d6d22..4ba167089e2a 100644
>> --- a/arch/arm64/tools/sysreg
>> +++ b/arch/arm64/tools/sysreg
>> @@ -48,6 +48,8 @@
>> # feature that introduces them (eg, FEAT_LS64_ACCDATA introduces enumeration
>> # item ACCDATA) though it may be more taseful to do something else.
>>
>> +# Please try to keep entries in this file sorted by sysreg encoding.
>> +
>> Sysreg OSDTRRX_EL1 2 0 0 0 2
>> Res0 63:32
>> Field 31:0 DTRRX
>
> "Do as I say, don't do as I do".
>
> I don't think this makes any sense if we don't actually sort the file
> the first place.
>
> M.
>
I think it's ok if it avoids review comments that new entries should be
sorted. Or maybe we do the opposite and the comment should say this file
is allowed to be unsorted...
On 26/12/2024 1:10 am, Jie Gan wrote:
> Add support for new APB clock-name. If the function fails
> to obtain the clock with the name "apb_pclk", it will
> attempt to acquire the clock with the name "apb".
>
> Signed-off-by: Jie Gan <quic_jiegan(a)quicinc.com>
> ---
> include/linux/coresight.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index 17276965ff1d..157c4bd009a1 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -459,8 +459,11 @@ static inline struct clk *coresight_get_enable_apb_pclk(struct device *dev)
> int ret;
>
> pclk = clk_get(dev, "apb_pclk");
> - if (IS_ERR(pclk))
> - return NULL;
> + if (IS_ERR(pclk)) {
> + pclk = clk_get(dev, "apb");
> + if (IS_ERR(pclk))
> + return NULL;
> + }
>
> ret = clk_prepare_enable(pclk);
> if (ret) {
Reviewed-by: James Clark <james.clark(a)linaro.org>
On 09/01/2025 21:53, Ilkka Koskinen wrote:
> Trying to record a trace on kernel with 64k pages resulted in -ENOMEM.
> This happens due to a bug in calculating the number of table pages, which
> returns zero. Fix the issue by rounding up.
>
> $ perf record --kcore -e cs_etm/@tmc_etr55,cycacc,branch_broadcast/k --per-thread taskset --cpu-list 1 dd if=/dev/zero of=/dev/null
> failed to mmap with 12 (Cannot allocate memory)
>
Needs a Fixes tag.
Fixes : 8ed536b1e283 ("coresight: catu: Add support for scatter gather
tables")
> Signed-off-by: Ilkka Koskinen <ilkka(a)os.amperecomputing.com>
> ---
> drivers/hwtracing/coresight/coresight-catu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c
> index 275cc0d9f505..3378bb77e6b4 100644
> --- a/drivers/hwtracing/coresight/coresight-catu.c
> +++ b/drivers/hwtracing/coresight/coresight-catu.c
> @@ -269,7 +269,7 @@ catu_init_sg_table(struct device *catu_dev, int node,
> * Each table can address upto 1MB and we can have
> * CATU_PAGES_PER_SYSPAGE tables in a system page.
> */
> - nr_tpages = DIV_ROUND_UP(size, SZ_1M) / CATU_PAGES_PER_SYSPAGE;
> + nr_tpages = DIV_ROUND_UP(size, CATU_PAGES_PER_SYSPAGE * SZ_1M);
> catu_table = tmc_alloc_sg_table(catu_dev, node, nr_tpages,
> size >> PAGE_SHIFT, pages);
> if (IS_ERR(catu_table))
Looks good to me, I will queue this later for v6.15.
Suzuki
Greg,
Please find the changes targeting v6.14 for the CoreSight self hosted tracing
subsystem.
Kindly pull
Suzuki
The following changes since commit fac04efc5c793dccbd07e2d59af9f90b7fc0dca4:
Linux 6.13-rc2 (2024-12-08 14:03:39 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git tags/coresight-next-v6.14
for you to fetch changes up to 56e14a21cee4ea6074b956a9ff2e406de5ad6548:
coresight-tpda: Optimize the function of reading element size (2024-12-13 10:25:15 +0000)
----------------------------------------------------------------
coresight: Updates for Linux v6.14
Coresight self-hosted tracing subsystem updates for v6.14 includes:
- Support for static traceid allocation for devices
- Support for impdef, static trace filtering in Qualcomm replicators
- Miscellaneous fixes
Signed-off-by: Suzuki K Poulose <suzuki.poulose(a)arm.com>
----------------------------------------------------------------
James Clark (1):
coresight: Drop atomics in connection refcounts
Mao Jinlong (3):
dt-bindings: arm: Add arm,static-trace-id for coresight dummy source
coresight: Add support to get static id for system trace sources
coresight: dummy: Add static trace id support for dummy source
Pei Xiao (1):
coresight: Fix dsb_mode_store() unsigned val is never less than zero
Songwei Chai (1):
Coresight: Narrow down the matching range of tpdm
Tao Zhang (4):
dt-bindings: arm: qcom,coresight-static-replicator: Add property for source filtering
coresight: Add a helper to check if a device is source
coresight: Add support for trace filtering by source
coresight-tpda: Optimize the function of reading element size
.../sysfs-bus-coresight-devices-dummy-source | 15 +++
.../bindings/arm/arm,coresight-dummy-source.yaml | 6 ++
.../arm/arm,coresight-static-replicator.yaml | 19 +++-
drivers/hwtracing/coresight/coresight-core.c | 113 +++++++++++++++++----
drivers/hwtracing/coresight/coresight-dummy.c | 81 +++++++++++++--
drivers/hwtracing/coresight/coresight-funnel.c | 6 +-
drivers/hwtracing/coresight/coresight-platform.c | 27 +++++
drivers/hwtracing/coresight/coresight-replicator.c | 6 +-
drivers/hwtracing/coresight/coresight-tpda.c | 19 +++-
drivers/hwtracing/coresight/coresight-tpdm.c | 7 +-
drivers/hwtracing/coresight/coresight-trace-id.c | 43 +++++---
drivers/hwtracing/coresight/coresight-trace-id.h | 9 ++
include/linux/coresight.h | 17 +++-
13 files changed, 309 insertions(+), 59 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-dummy-source
On 09/01/2025 12:01, Yeoreum Yun wrote:
> Hi Suzuki,
>
>> Is it not better to have separate "configs" for perf and sysfs ?
>> And etmX driver can populate the "running" config, based on the
>> mode specific config. That way, the configs can be updated
>> independently without affecting the running config or the perf one.
>>
>
> That was i've tried but I've accepted Mike's opinion that
> it's enough to check whether CS_MODE_DISABLED via coresight_get_mode()
> in *_store().
>
> "the .._store functions in sysfs should use coresight_get_mode() to ensure
> this is set to CS_MODE_DISABLED before altering the config,
> which ensures that the trace system is inactive.
> We don't' really care about reading the config if trace is running."
There are two issues with that :
1. Sprinkling the get_mode call in each sysfs stor function doesn't look
good to me.
2. Someone preparing for a sysfs session must not be prevented from
doing so just because there is a perf session running.
Suzuki
> Thanks.
>
Hi Levi,
On 21/12/2024 16:59, Yeoreum Yun wrote:
> When etm4x configuration is modified via sysfs while etm4x is being
> enabled via perf, enabled etm4x could run with different configuration
> from perf_event.
>
> To address this, disallow altering config via sysfs while csdev is enabled.
>
> Signed-off-by: Yeoreum Yun <yeoreum.yun(a)arm.com>
> ---
> .../coresight/coresight-etm4x-sysfs.c | 132 +++++++++++++++++-
> 1 file changed, 128 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> index 11e865b8e824..cc1f112921d7 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> @@ -174,6 +174,9 @@ static ssize_t reset_store(struct device *dev,
> if (kstrtoul(buf, 16, &val))
> return -EINVAL;
>
> + if (coresight_get_mode(drvdata->csdev))
> + return -EBUSY;
> +
Is it not better to have separate "configs" for perf and sysfs ?
And etmX driver can populate the "running" config, based on the
mode specific config. That way, the configs can be updated
independently without affecting the running config or the perf one.
Suzuki
Hi
On 11/11/2024 14:12, Alexander Shishkin wrote:
> Uwe Kleine-König <u.kleine-koenig(a)baylibre.com> writes:
>
>> After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
>> return void") .remove() is (again) the right callback to implement for
>> platform drivers.
>>
>> Convert all platform drivers below drivers/hwtracing to use .remove(),
>> with the eventual goal to drop struct platform_driver::remove_new(). As
>> .remove() and .remove_new() have the same prototypes, conversion is done
>> by just changing the structure member name in the driver initializer.
>>
>> Also adapt some whitespace to make indention consistent.
>>
>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig(a)baylibre.com>
>
> Acked-by: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
>
>> ---
>> Hello,
>>
>> I did a single patch for all of drivers/hwtracing. While I usually
>> prefer to do one logical change per patch, this seems to be
>> overengineering here as the individual changes are really trivial and
>> shouldn't be much in the way for stable backports. But I'll happily
>> split the patch if you prefer it split. Maybe split for coresight vs.
>> intel_th? Also if you object the indentation stuff, I can rework that.
>
> I'm fine with it as is.
>
>> This is based on today's next, if conflicts arise when you apply it at
>> some later time and don't want to resolve them, feel free to just drop
>> the changes to the conflicting files. I'll notice and followup at a
>> later time then. Or ask me for a fixed resend. (Having said that, I
>> recommend b4 am -3 + git am -3 which should resolve most conflicts just
>> fine.)
>
> Does anybody want to pick this up or should I? I'm fine either way, but
> if there are any conflicts they won't be from my end of things, so it
> might make sense to take it via the coresight path.
I am happy to take them via coresight tree and queue them for v6.14
Suzuki
>
> Thanks,
> --
> Alex