Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1385507pxb; Fri, 21 Jan 2022 17:13:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJywU6uhKOyjeWAcp2jU36TsBDAnV35P1fPO/adj548QM9k2dk0jOCt9jRCviG+SZhoi6kZR X-Received: by 2002:a17:90b:1c8c:: with SMTP id oo12mr3157236pjb.148.1642814034641; Fri, 21 Jan 2022 17:13:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642814034; cv=none; d=google.com; s=arc-20160816; b=SuMtBcYKY5XBIhz1VQUAjtjeq1oxo5DyX9iayMarTffeR4SiR8uuysD9sp6Rj1m1i1 xmY+swIcJlKsTVjbV9sIahLyRvCiDvgqdtXX5mRpxvcTX5321SIRyqi6s2P2oN4M6w74 VW+mtPXtTiPp9ukcd+IuAMxTq8kfcxER+Z7rnpEgMFTXgrFoN6DvicoorUTsw4iG5Uo3 C8Gjnq0BHK/h2HyfE+rEfSihwS/rW4sczfgZD20/EL11thQLWaAwoNzFxLt8IFS241W0 mmCZVSfGTe2oUTNmbWXJkM3tVbmNkwpQIP/Bp6Mi2i/5zKVAJZ36gYafhv7Xg0TTsr44 VbIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DPQjdtK4pXoEDJ51K+ZcxZTPO84Dqge8Jmq/wEYY82I=; b=kvLnGb+rEj/pAurOXsR86hx3L8F3NdzgalhZ3lVEkVqvBPSNpl1CloP0o3h96G2mHV Hn55udQbJK0wz8941i1/DLLepOja2ztLZe0Ig3WSI5dsau5QMhOVY+GUttrI0WcpD5J4 ekIe4o8V3iJ3h7YYIUOJ/Wn4GC6qzbnDHtOj9T6ZyEH7Zg9P8Py+Rf0QQGxpkTaew8sv r4fMnuQf7GpG88qgJEUOEVSbX7w/SDKo8q6tpdsQ5wAMFVEiW3Tuso0WhN2BY/MoU3MI iV4kGiYsWUu2jOqKpvug4nPccNE+TP5/CXUUhNE64XvBxQ56amnLPE21I6gm78dh2MvH qVHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YOn+JJpa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w71si662831pgd.639.2022.01.21.17.13.43; Fri, 21 Jan 2022 17:13:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YOn+JJpa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380483AbiAUMpO (ORCPT + 99 others); Fri, 21 Jan 2022 07:45:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380494AbiAUMov (ORCPT ); Fri, 21 Jan 2022 07:44:51 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09ED3C061574 for ; Fri, 21 Jan 2022 04:44:50 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id q9-20020a7bce89000000b00349e697f2fbso28809578wmj.0 for ; Fri, 21 Jan 2022 04:44:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DPQjdtK4pXoEDJ51K+ZcxZTPO84Dqge8Jmq/wEYY82I=; b=YOn+JJpaTq4eYiycePZ7qnAtcezSFmqZfjSUg+PQ8EExDCxkuoxpNrt+J6+bmx6RFr hhPSiNtKvghUg8lFwRVuSTrdy4o4Zh5Pbu3otC6JszaRZKLGMAJOJCmWFyzAij7kKSMP jn1GJtBgwbAExJ0ehEJ1qfdvaZ8vT/0BrcSvWkI0S6fntkcIj6e9P2zYM4WkatFO8XIZ bq2fPYT7g4guGDiSEUglon4PA8gHiz1bAhUJw8SjPOFox0jmpEvF3UUjLXFByeDKcFiZ VxwHeY1WRa1r4pMX6mIFORD8eXi+2dzqe+MwuNrzY9ucgeXicF5v2rcPPxw8VlvYuJu/ NsPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DPQjdtK4pXoEDJ51K+ZcxZTPO84Dqge8Jmq/wEYY82I=; b=qzCwrcAmb5PpI1lfvU0dXE8qg2kvQYt+P1OENWqK84hLXufaQnAvLq8hnQQxr/O6rf qRmvFOF/85af09SsGLNTSaL3j49D+TABYqiROXYZv835Tai668qvBJxGxJrWtXU3i0pO 1V9JaRbNQhKpufiIq3j145XBz/i1wf6SF6I9yl2e1ThKKOL6tOqG34WMGmaSh0frrx97 EKZ1zxnLypUVtZRq9/xLZk3q/XbFFQyBVbBf8FAUrATJdOgdEL6lgQaEnhPF2wyX87tC 6PwlFGYXPL/ru61vafivJVB2WRTa0F47p/32AUCeA6MlIrIHJgSzJY5qs/M23mPLqMdW fWJQ== X-Gm-Message-State: AOAM531n8yY/25PXcvdwpyZ17MAlJxq/dGckDoIHIYiN/kGS/KDARo1Z nQrgYWkKeNKDRtygKJ+8KCUueaKWjSntKICtrPH+eA== X-Received: by 2002:adf:df84:: with SMTP id z4mr3699794wrl.519.1642769088620; Fri, 21 Jan 2022 04:44:48 -0800 (PST) MIME-Version: 1.0 References: <20220113091056.1297982-1-james.clark@arm.com> <20220113091056.1297982-4-james.clark@arm.com> In-Reply-To: <20220113091056.1297982-4-james.clark@arm.com> From: Mike Leach Date: Fri, 21 Jan 2022 12:44:37 +0000 Message-ID: Subject: Re: [PATCH v2 3/6] perf cs-etm: Update deduction of TRCCONFIGR register for branch broadcast To: James Clark Cc: suzuki.poulose@arm.com, mathieu.poirier@linaro.org, coresight@lists.linaro.org, leo.yan@linaro.com, Leo Yan , John Garry , Will Deacon , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 13 Jan 2022 at 09:11, James Clark wrote: > > Now that a config flag for branch broadcast has been added, take it into > account when trying to deduce what the driver would have programmed the > TRCCONFIGR register to. > > Reviewed-by: Leo Yan > Signed-off-by: James Clark > --- > tools/include/linux/coresight-pmu.h | 2 ++ > tools/perf/arch/arm/util/cs-etm.c | 3 +++ > 2 files changed, 5 insertions(+) > > diff --git a/tools/include/linux/coresight-pmu.h b/tools/include/linux/coresight-pmu.h > index 4ac5c081af93..6c2fd6cc5a98 100644 > --- a/tools/include/linux/coresight-pmu.h > +++ b/tools/include/linux/coresight-pmu.h > @@ -18,6 +18,7 @@ > * ETMv3.5/PTM doesn't define ETMCR config bits with prefix "ETM3_" and > * directly use below macros as config bits. > */ > +#define ETM_OPT_BRANCH_BROADCAST 8 > #define ETM_OPT_CYCACC 12 > #define ETM_OPT_CTXTID 14 > #define ETM_OPT_CTXTID2 15 > @@ -25,6 +26,7 @@ > #define ETM_OPT_RETSTK 29 > > /* ETMv4 CONFIGR programming bits for the ETM OPTs */ > +#define ETM4_CFG_BIT_BB 3 > #define ETM4_CFG_BIT_CYCACC 4 > #define ETM4_CFG_BIT_CTXTID 6 > #define ETM4_CFG_BIT_VMID 7 > diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c > index 293a23bf8be3..c7ef4e9b4a3a 100644 > --- a/tools/perf/arch/arm/util/cs-etm.c > +++ b/tools/perf/arch/arm/util/cs-etm.c > @@ -527,6 +527,9 @@ static u64 cs_etmv4_get_config(struct auxtrace_record *itr) > if (config_opts & BIT(ETM_OPT_CTXTID2)) > config |= BIT(ETM4_CFG_BIT_VMID) | > BIT(ETM4_CFG_BIT_VMID_OPT); > + if (config_opts & BIT(ETM_OPT_BRANCH_BROADCAST)) > + config |= BIT(ETM4_CFG_BIT_BB); > + > return config; > } > > -- > 2.28.0 > Reviewed-by: Mike Leach -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK