[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <576279c5-9f7a-7af1-e5c7-776816e5b378@arm.com>
Date: Fri, 30 Jul 2021 15:35:51 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Suzuki K Poulose <suzuki.poulose@....com>,
linux-arm-kernel@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org, coresight@...ts.linaro.org,
will@...nel.org, catalin.marinas@....com, james.morse@....com,
mathieu.poirier@...aro.org, mike.leach@...aro.org,
leo.yan@...aro.org, maz@...nel.org, mark.rutland@....com
Subject: Re: [PATCH 03/10] coresight: trbe: Add a helper to pad a given buffer
area
On 7/28/21 7:22 PM, Suzuki K Poulose wrote:
> Refactor the helper to pad a given AUX buffer area to allow
> "filling" ignore packets, without moving any handle pointers.
> This will be useful in working around errata, where we may
> have to fill the buffer after a session.
>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
> ---
> drivers/hwtracing/coresight/coresight-trbe.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c
> index a0168ad204b3..0af644331b99 100644
> --- a/drivers/hwtracing/coresight/coresight-trbe.c
> +++ b/drivers/hwtracing/coresight/coresight-trbe.c
> @@ -228,12 +228,18 @@ static void trbe_stop_and_truncate_event(struct perf_output_handle *handle)
> * consumed from the user space. The enabled TRBE buffer area is a moving subset of
> * the allocated perf auxiliary buffer.
> */
> +
> +static void __trbe_pad_buf(struct trbe_buf *buf, u64 offset, int len)
> +{
> + memset((void *)buf->trbe_base + offset, ETE_IGNORE_PACKET, len);
> +}
> +
> static void trbe_pad_buf(struct perf_output_handle *handle, int len)
> {
> struct trbe_buf *buf = etm_perf_sink_config(handle);
> u64 head = PERF_IDX2OFF(handle->head, buf);
>
> - memset((void *)buf->trbe_base + head, ETE_IGNORE_PACKET, len);
> + __trbe_pad_buf(buf, head, len);
> if (!buf->snapshot)
> perf_aux_output_skip(handle, len);
> }
>
Reviewed-by: Anshuman Khandual <anshuman.khandual@....com>
Powered by blists - more mailing lists