[EXT] Re: [PATCH 2/7] coresight: tmc-etr: Add support to use reserved trace memory

Linu Cherian lcherian at marvell.com
Mon Oct 2 21:34:36 PDT 2023


Hi James,

> -----Original Message-----
> From: James Clark <james.clark at arm.com>
> Sent: Monday, October 2, 2023 8:34 PM
> To: Linu Cherian <lcherian at marvell.com>
> Cc: linux-arm-kernel at lists.infradead.org; coresight at lists.linaro.org; linux-
> kernel at vger.kernel.org; robh+dt at kernel.org;
> krzysztof.kozlowski+dt at linaro.org; conor+dt at kernel.org;
> devicetree at vger.kernel.org; Sunil Kovvuri Goutham
> <sgoutham at marvell.com>; George Cherian <gcherian at marvell.com>; Anil
> Kumar Reddy H <areddy3 at marvell.com>; suzuki.poulose at arm.com;
> mike.leach at linaro.org; leo.yan at linaro.org
> Subject: [EXT] Re: [PATCH 2/7] coresight: tmc-etr: Add support to use
> reserved trace memory
> 
> External Email
> 
> ----------------------------------------------------------------------
> 
> 
> On 29/09/2023 14:37, Linu Cherian wrote:
> > Add support to use reserved memory for coresight ETR trace buffer.
> >
> > Introduce a new ETR buffer mode called ETR_MODE_RESRV, which
> becomes
> > available when ETR device tree node is supplied with a valid reserved
> > memory region.
> >
> > ETR_MODE_RESRV can be selected only by explicit user request.
> >
> > $ echo resrv
> >/sys/bus/coresight/devices/tmc_etr<N>/buf_mode_preferred
> >
> > Signed-off-by: Anil Kumar Reddy <areddy3 at marvell.com>
> > Signed-off-by: Linu Cherian <lcherian at marvell.com>
> > ---
> >  .../hwtracing/coresight/coresight-tmc-core.c  | 51 +++++++++++
> >  .../hwtracing/coresight/coresight-tmc-etr.c   | 87 ++++++++++++++++++-
> >  drivers/hwtracing/coresight/coresight-tmc.h   | 24 +++++
> >  3 files changed, 161 insertions(+), 1 deletion(-)
> 
> [...]
> 
> >
> > +static void tmc_get_reserved_region(struct device *parent) {
> > +	struct tmc_drvdata *drvdata = dev_get_drvdata(parent);
> > +	struct device_node *node;
> > +	struct resource res;
> > +	int rc;
> > +
> > +	node = tmc_get_region_byname(parent->of_node, "tracedata-
> mem");
> 
> Is this a typo? The DT commit says the region is called "trace-mem". And
> "metadata-mem" for the other region, but that one matches the other call to
> tmc_get_region_byname() added in the later commit.

Ack. Will fix in the next version.

> 
> > +	if (IS_ERR_OR_NULL(node)) {
> > +		dev_dbg(parent, "No reserved trace buffer specified\n");
> > +		goto out;
> > +	}
> > +


More information about the linux-arm-kernel mailing list