[PATCH v3 02/31] coresight: etm4x: Always set tracer's device mode on target CPU

Leo Yan leo.yan at arm.com
Mon Sep 15 05:45:40 PDT 2025


On Mon, Sep 15, 2025 at 11:47:43AM +0100, Suzuki Kuruppassery Poulose wrote:

[...]

> > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> > index 020f070bf17dc0557dfb3ae4f282b0a0c1778bd8..02ad41da7356547a67c53ff0a9146aec844f89da 100644
> > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
> > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> > @@ -592,10 +592,23 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata)
> >   static void etm4_enable_hw_smp_call(void *info)
> 
> While at this, please could you rename this function to make it explicit
> that this is only for sysfs mode ?
> 
> e.g., etm4_enable_hw_sysfs_smp_call()

If no objection, I will update pair functions to

  etm4_enable_sysfs_smp_call() / etm4_disable_sysfs_smp_call()

[...]

> > @@ -811,6 +824,9 @@ static int etm4_enable_perf(struct coresight_device *csdev,
> >   	int ret = 0;
> >   	struct etmv4_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
> > +	if (!coresight_take_mode(csdev, CS_MODE_PERF))
> > +		return -EBUSY;
> > +
> 
> Should be done after the CPU check below ? Otherwise you are undoing the
> fix on sysfs side.

ETMv3 driver has done in the suggested way for checking CPU first.
ETMv4 driver should align with it. I will update in next version.

Thanks,
Leo



More information about the linux-arm-kernel mailing list