Message ID | 20230127205546.667740-1-robh@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1042277wrn; Fri, 27 Jan 2023 13:03:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXv3lRAjkRp1mubL9fPWfukUKSE7M2hqazR02ph3vpkkgAGx7NTlSpZIKVZBshG2d5blTm8g X-Received: by 2002:a05:6a21:6d8c:b0:b1:e8da:d5bc with SMTP id wl12-20020a056a216d8c00b000b1e8dad5bcmr54773507pzb.56.1674853416976; Fri, 27 Jan 2023 13:03:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674853416; cv=none; d=google.com; s=arc-20160816; b=XerkTUWgFaodOPo0h1MMzxLJebse0U+w86GUEry4x9xJHdHwG/ISfe1UFrPNVcCAYt trL5TC1l9buynQ2kxN1HYqAA9w1q3PwgLZPgRxHlJGJtSsNEKOKb6/DbK+PcpVxNwESz OFvqWjE2nhH69IUraUEBy/o6ApqyNnAqtzCAhedkUE1t/wrhjIZYgj8T9wr8qWg4+pK3 SFvp2273es2zfKzYvXhAW3NEdx32h9rptBhp1OX6mOZHzRLa2Cquw+FemYKJR/yEnp8p e7xWFh7ESXa9JjapGdDzmgnKhd4PjPqxZdIVPhr1K/pIJG+3CvS7uHW6IWNppbquw74F d0Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=V8VMvEIlksojIPK+k+dQrshS7s0qt34621V8kUWytFU=; b=pM4RP2qAyXMbAF8HT7OIlyX1rLE5mWIWsTvJ4Nog+d+I5dvTgPfzzKWQAzzGiZiBxD INyMF7OCJOr4to1uT0ST7hlB0k66fW32rXMmmHrraU0b/GP+aeAZE6XdSovuHc2v0dwb XsGhf3xM0VL4so+oGTno2+Gp2TW2mXWS3PxMWtr+AXoPg2tp860WYhLUkWJU1vw/wmr0 g2EYDiyf5M9esaZtGyhs6NR1TqECKV0Jg5DbpTODUe4z1TyWulPHAZ0NHrmKqIEb8t14 wU7NW2tdZI6o5GABFA41u0p6MF2fz8RVhjnHuDVIgAM0m7uqUDr27aM+grXrCKtbqs9d k+8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k74-20020a636f4d000000b00479337c8eabsi4900973pgc.581.2023.01.27.13.03.23; Fri, 27 Jan 2023 13:03:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229518AbjA0U4t (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Fri, 27 Jan 2023 15:56:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231731AbjA0U4j (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Jan 2023 15:56:39 -0500 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0107284FA7; Fri, 27 Jan 2023 12:56:35 -0800 (PST) Received: by mail-oi1-f175.google.com with SMTP id 25so1640057oij.13; Fri, 27 Jan 2023 12:56:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=V8VMvEIlksojIPK+k+dQrshS7s0qt34621V8kUWytFU=; b=hsLMgXh/SBJxX5YtaL2yTDP8HoLAMseQfp3gdvZ/8o7GEU6HxS66pXHBQxK20/mWNj YHrYPFVVd6xyr6G+x3D5xamR/5cYs9fkpAkUXE7B8pMJ5nmmi2elBvxgfxbCUhHVmUvO UVuvBa9vKvm404eJMxzrqXzLj8vbjK2/O9dPxACXeaOgskU9PvxGPpguwXjXFFSp+GnP uUe6Une3nAEuXGl2QiegMChGWI06MZCUHxTdenlywjsLGORCwVY6nte1E7ggqA6moMt8 ubww3EkRawnskZuVJbkCldmcZGJDYPDoScf4nkBNoD0ae5CDzLWopnsPO3vUNvgAjmfX +6+A== X-Gm-Message-State: AFqh2kqU4e1Jv5knTrNpFwNexpOwus1ej12eLf3+7Mi7k1TmY2ZzQAhG 1dtzKYlrr+kQoWUTwQ1LL46FqAk7Jw== X-Received: by 2002:a05:6808:b37:b0:36e:b267:4d16 with SMTP id t23-20020a0568080b3700b0036eb2674d16mr13761487oij.6.1674852995068; Fri, 27 Jan 2023 12:56:35 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id r132-20020acac18a000000b0035c422bb303sm1985437oif.19.2023.01.27.12.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 12:56:34 -0800 (PST) Received: (nullmailer pid 668789 invoked by uid 1000); Fri, 27 Jan 2023 20:56:33 -0000 From: Rob Herring <robh@kernel.org> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org> Cc: James Clark <james.clark@arm.com>, Will Deacon <will@kernel.org>, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] perf arm-spe: Only warn once for each unsupported address packet Date: Fri, 27 Jan 2023 14:55:46 -0600 Message-Id: <20230127205546.667740-1-robh@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756211096151569023?= X-GMAIL-MSGID: =?utf-8?q?1756211096151569023?= |
Series |
perf arm-spe: Only warn once for each unsupported address packet
|
|
Commit Message
Rob Herring
Jan. 27, 2023, 8:55 p.m. UTC
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>
---
tools/perf/util/arm-spe-decoder/arm-spe-decoder.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
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> > --- > 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 >
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 > >
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;