From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18C3BC433F5 for ; Fri, 21 Jan 2022 12:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380488AbiAUMpR (ORCPT ); Fri, 21 Jan 2022 07:45:17 -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-Google-Smtp-Source: ABdhPJz4QOjqVkZxNGF7KOwGwgPMHWlelSBELk2kW26iBm4WwgkvOXimF67qWWx4a11KNN8oUewr3BjwQ9LjfmEwKEg= 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 640E6C433EF for ; Fri, 21 Jan 2022 12:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6R0sAGcoiAHz5CTMPkZsaM2wrqjzT+eN+Y2bLF7K65s=; b=Y0ImU839QLaZSt sQAsCUMaDFFILyGicmWLvd1BXevGZerICaofKyWdx6tJYbzXvpDGGU9eczF86tQi/8kRMxkgD2mc7 6RCCMYaSFXoGqsGe11I4dsVuF4IKyUsqmN978U/TvDTHa0CeNFxe1rnnTSLDTrI4HoyQHyxonw9UZ xyZPx3/9E9Ll0bKVcGLzsr+9MZf6L897FkXJl8VfCFSVA0UyIwFsmoK7iIoBbShNbfUD79Yh9qXpv iCpRcgFJrQlsR/w4FgfkpO0x+2MNqdsESTazUE1lnEsNp2XhwnW5eOzpWnAGwcUAfOndd7eCU+T4y 9+mQE60VExwsUyRW3xhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAtHi-00Eyt0-8D; Fri, 21 Jan 2022 12:44:54 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAtHe-00Eyro-Cz for linux-arm-kernel@lists.infradead.org; Fri, 21 Jan 2022 12:44:51 +0000 Received: by mail-wm1-x336.google.com with SMTP id o1-20020a1c4d01000000b0034d95625e1fso14244502wmh.4 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=2ZmoNYrCMNiEDuZL59hgQqIZPoIK0m2apQkYvLNO7qkCWfyNNaEuqCkuYA63adBKff IJxqNeLAHCeaA4rL4m6ckGXX8PVzsnpon2qXrQhBCf1Q3PeNR8n2utPvqM8r3fkm7ZqG rDvONdcggXr5qXxWoWL97DaCx3xyYo2lz7k1zEEwvNvKSgDWUU4+pP+d9aIFHHdOQpqb OQqZDpfmB+3JAWmVLxL2PQBQtOCuWsteAQAJ2SGJRWwzFF92f5Hxq3uCdSdrDKc5resM vtvYz4B9IL8fKc4aR+IfgnrJJY1gBKEeukIYm0tP5FAG3tJhSB7YMnm7AOQ0woPqQNDh vvww== X-Gm-Message-State: AOAM533noasnByEdIyRj/AX2dWeOqWY+b1hTDB3UN/LimXntF7F5mayG qE/tUaS5X/eQsTjYazjoyNo/Kuj5gPhetu3rpDekqw== X-Google-Smtp-Source: ABdhPJz4QOjqVkZxNGF7KOwGwgPMHWlelSBELk2kW26iBm4WwgkvOXimF67qWWx4a11KNN8oUewr3BjwQ9LjfmEwKEg= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220121_044450_473710_CCD384B2 X-CRM114-Status: GOOD ( 18.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel