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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxx>
> Signed-off-by: Linu Cherian <lcherian@xxxxxxxxxxx>
> ---
>  .../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.

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux