From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Leo Yan <leo.yan@linaro.org>
Cc: Rob Herring <robh@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
James Clark <james.clark@arm.com>, Will Deacon <will@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf arm-spe: Only warn once for each unsupported address packet
Date: Wed, 1 Feb 2023 22:14:25 -0300 [thread overview]
Message-ID: <Y9sOceFTriHj9OIV@kernel.org> (raw)
In-Reply-To: <Y9cn4NYvI6+XW302@leoy-yangtze.lan>
Em Mon, Jan 30, 2023 at 10:13:52AM +0800, Leo Yan escreveu:
> On Fri, Jan 27, 2023 at 02:55:46PM -0600, Rob Herring wrote:
> > Unknown address packet indexes are not an error as the Arm architecture
> > can (and has with SPEv1.2) define new ones and implementation defined
> > ones are also allowed. The error message for every occurrence of the
> > packet is needlessly noisy as well. Change the message to print just
> > once for each unknown index.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
>
> Reviewed-by: Leo Yan <leo.yan@linaro.org>
Thanks, applied.
- Arnaldo
> > ---
> > tools/perf/util/arm-spe-decoder/arm-spe-decoder.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > index 091987dd3966..40dcedfd75cd 100644
> > --- a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > +++ b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > @@ -68,7 +68,11 @@ static u64 arm_spe_calc_ip(int index, u64 payload)
> > /* Clean highest byte */
> > payload = SPE_ADDR_PKT_ADDR_GET_BYTES_0_6(payload);
> > } else {
> > - pr_err("unsupported address packet index: 0x%x\n", index);
> > + static u32 seen_idx = 0;
> > + if (!(seen_idx & BIT(index))) {
> > + seen_idx |= BIT(index);
> > + pr_warning("ignoring unsupported address packet index: 0x%x\n", index);
> > + }
> > }
> >
> > return payload;
> > --
> > 2.39.0
> >
--
- Arnaldo
prev parent reply other threads:[~2023-02-02 1:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 20:55 [PATCH] perf arm-spe: Only warn once for each unsupported address packet Rob Herring
2023-01-30 2:13 ` Leo Yan
2023-02-02 1:14 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9sOceFTriHj9OIV@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).