[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9440a191-86af-4eea-b867-8f65131bd701@arm.com>
Date: Thu, 4 Dec 2025 17:38:05 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Leo Yan <leo.yan@....com>, Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>, James Clark <james.clark@...aro.org>,
Yeoreum Yun <yeoreum.yun@....com>, Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>, Tamas Petz <tamas.petz@....com>,
Tamas Zsoldos <tamas.zsoldos@....com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>
Cc: coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 01/19] coresight: trbe: Use helpers for checking errata
On 01/12/25 4:51 PM, Leo Yan wrote:
> Use the existed helpers for checking errata instead of open coded
Small nit - s/the existed helpers/the existing helpers/
> equivalent.>
> Signed-off-by: Leo Yan <leo.yan@....com>
> ---
> drivers/hwtracing/coresight/coresight-trbe.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c
> index 293715b4ff0eb0abe30f9b477700ca94f81cd4a2..0ddb3db0213cf0014e29decfb79da68b0a351b31 100644
> --- a/drivers/hwtracing/coresight/coresight-trbe.c
> +++ b/drivers/hwtracing/coresight/coresight-trbe.c
> @@ -723,7 +723,7 @@ static unsigned long trbe_get_trace_size(struct perf_output_handle *handle,
> * the space we skipped with IGNORE packets. And we are always
> * guaranteed to have at least a PAGE_SIZE space in the buffer.
> */
> - if (trbe_has_erratum(buf->cpudata, TRBE_WORKAROUND_OVERWRITE_FILL_MODE) &&
> + if (trbe_may_overwrite_in_fill_mode(buf->cpudata) &&
> !WARN_ON(size < overwrite_skip))
> __trbe_pad_buf(buf, start_off, overwrite_skip);
>
> @@ -946,7 +946,7 @@ static int trbe_apply_work_around_before_enable(struct trbe_buf *buf)
> * - At trace collection:
> * - Pad the 256bytes skipped above again with IGNORE packets.
> */
> - if (trbe_has_erratum(buf->cpudata, TRBE_WORKAROUND_OVERWRITE_FILL_MODE)) {
> + if (trbe_may_overwrite_in_fill_mode(buf->cpudata)) {
> if (WARN_ON(!IS_ALIGNED(buf->trbe_write, PAGE_SIZE)))
> return -EINVAL;
> buf->trbe_hw_base = buf->trbe_write;
> @@ -970,7 +970,7 @@ static int trbe_apply_work_around_before_enable(struct trbe_buf *buf)
> * - Adjust the TRBLIMITR.LIMIT to leave the extra PAGE outside
> * the TRBE's range (i.e [TRBBASER, TRBLIMITR.LIMI] ).
> */
> - if (trbe_has_erratum(buf->cpudata, TRBE_WORKAROUND_WRITE_OUT_OF_RANGE)) {
> + if (trbe_may_write_out_of_range(buf->cpudata)) {
> s64 space = buf->trbe_limit - buf->trbe_write;
> /*
> * We must have more than a PAGE_SIZE worth space in the proposed
>
LGTM
Reviewed-by: Anshuman Khandual <anshuman.khandual@....com>
Powered by blists - more mailing lists