Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2201704pxb; Fri, 5 Mar 2021 09:31:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyR6JgDSpNVuU/24On+U/sSlD+6k1KbbHnFRPXXoxiiIJ6W7p92ND5WwYzllY61QDfsIevM X-Received: by 2002:a17:906:1613:: with SMTP id m19mr3270365ejd.344.1614965477225; Fri, 05 Mar 2021 09:31:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614965477; cv=none; d=google.com; s=arc-20160816; b=VXSFRTffa++rJ/Y+LDYw6DtOx24NHgjWqC2siaxJEbm/65oezPDfBxssdEMNoMSTZk 612QyiG1b9effBuLXF1gBBQT5MUgNYQgqQHeTceyR8ZN4wBCuFSXQ4G371L0JH1VO2Jr 0Qao8P3YSYTkN4XG7MCqKUubT7RTeweidYWzT0J9sCoY1arjAGbkjWRfWtJKoZVpE4dN /l436YYQlWYro/toTB2CE6yZ76KHDYVIvVm3ZTpKkMsUWRivEh5Kh/j2xdyjcSAqCAJq m8Z1/r+lesTCbRIuaNb3LhEPORcSzW8gx/+0Q6yUWAQvZb32039yDnX+1YxRat0gdaoF J5kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mClRH3Yf2PQRFO5l5cQdC8wKJUzCdkaQPJXdXXZvoVw=; b=gMIeR/sj0Q+1jvjz0PVjF2XpDz5QjJQ8qun6z/o/mCd7H9We15szJ5E4SB4uc0IlPj TP1QyPWZTCeylkcXr5CDVSJhid472GvyKHklJlnHKOcFI1DEIA57LuecowgX1szhWOHc uXbEqxrVakNw+2LZ2C14Rjm0OgJ3tnlDda8A0C0VN/wYrjg/JAUduZSdQIrSIggnH/OJ Q3Y49uBlEmLJnfvfVVbcnkRclgLAr6IhMwmH6xiIEN8BexMpgmdg5VCt9kfmj8uPUGiI fESBsKKQE6sxIqB5g50LmYHcY8QWTUgpNoNoZ0ZSVqy91R448TT62LizwZZhMlxSAfZc g91g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KW+QDqfe; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la8si1701717ejc.79.2021.03.05.09.30.52; Fri, 05 Mar 2021 09:31:17 -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=@kernel.org header.s=k20201202 header.b=KW+QDqfe; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229563AbhCER3u (ORCPT + 99 others); Fri, 5 Mar 2021 12:29:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:51522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhCER3r (ORCPT ); Fri, 5 Mar 2021 12:29:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B20F65020; Fri, 5 Mar 2021 17:29:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614965386; bh=4r34DUYNpOJvEcVPpR+6wZnWvRIaTcgeWMWyB2GA44o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KW+QDqfeuEhA66S19otS9K3dumS+X+QQXoylVq+1tB5Hr6UOR3tNkKMaBLbF76OXz MJySLIfflBFYFWokdbzwT2jgnwg9jiZmya8gQuNBfXVynLDZq+YTFTlu2yd/UKSgsV UoCeqTwAXlJf2/o7dP8RMh0T9QE9WBoSzI1/FPcfQZqOX+jNqXqpes2IrWDsqBy5I6 ipUNqYgg0hmEA2diUjQG4odPCKiH6kd3eY4nGFdYcuau5JVaTWDcmMx7k+CGCPEH5V BXonDpAkbH9JuSKGDvzsJEaJnE6Ky4DGqmZLpWdVRyM80vxuUZrat6lS1yeCULmdj9 KlaaM0sfG22Hw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 6AC4040647; Fri, 5 Mar 2021 14:29:44 -0300 (-03) Date: Fri, 5 Mar 2021 14:29:44 -0300 From: Arnaldo Carvalho de Melo To: Leo Yan Cc: Mathieu Poirier , Suzuki K Poulose , Mike Leach , Jonathan Corbet , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , Namhyung Kim , Daniel Kiss , Denis Nikitin , Al Grant , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 4/8] perf cs-etm: Fix bitmap for option Message-ID: References: <20210206150833.42120-1-leo.yan@linaro.org> <20210206150833.42120-5-leo.yan@linaro.org> <20210208204641.GE2077938@xps15> <20210209015855.GA54680@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210209015855.GA54680@leoy-ThinkPad-X240s> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Feb 09, 2021 at 09:58:55AM +0800, Leo Yan escreveu: > On Mon, Feb 08, 2021 at 01:46:41PM -0700, Mathieu Poirier wrote: > > On Sat, Feb 06, 2021 at 11:08:29PM +0800, Leo Yan wrote: > > > From: Suzuki K Poulose > > > > > > When set option with macros ETM_OPT_CTXTID and ETM_OPT_TS, it wrongly > > > takes these two values (14 and 28 prespectively) as bit masks, but > > > actually both are the offset for bits. But this doesn't lead to > > > further failure due to the AND logic operation will be always true for > > > ETM_OPT_CTXTID / ETM_OPT_TS. > > > > > > This patch defines new independent macros (rather than using the > > > "config" bits) for requesting the "contextid" and "timestamp" for > > > cs_etm_set_option(). > > > > > > [leoy: Extract the change as a separate patch for easier review] > > > > This should go just above your name - see below. I fixed this up and added this patch to my perf/urgent branch, for v5.12, since the kernel bits are upstream and this is a fix. Looking at the other patches in the series. - Arnaldo > > > Signed-off-by: Suzuki K Poulose > > > Signed-off-by: Leo Yan > > > Reviewed-by: Mike Leach > > > > Signed-off-by: Suzuki K Poulose > > [Extract the change as a separate patch for easier review] > > Signed-off-by: Leo Yan > > Reviewed-by: Mike Leach > > > > > --- > > > tools/perf/arch/arm/util/cs-etm.c | 12 ++++++++---- > > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > > > diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c > > > index bd446aba64f7..c25c878fd06c 100644 > > > --- a/tools/perf/arch/arm/util/cs-etm.c > > > +++ b/tools/perf/arch/arm/util/cs-etm.c > > > @@ -156,6 +156,10 @@ static int cs_etm_set_timestamp(struct auxtrace_record *itr, > > > return err; > > > } > > > > > > +#define ETM_SET_OPT_CTXTID (1 << 0) > > > +#define ETM_SET_OPT_TS (1 << 1) > > > +#define ETM_SET_OPT_MASK (ETM_SET_OPT_CTXTID | ETM_SET_OPT_TS) > > > + > > > > I would much rather see this fixed with the BIT() macro as it is done in the > > rest of this set than defining new constant. > > > > With the above: > > > > Reviewed-by: Mathieu Poirier > > > > I have picked up the kernel portion of this set. I suggest you fix the above > > and send another revision to Arnaldo with my RBs. > > Will do this. Thanks for suggestion, Mathieu. > > Leo > > [...] -- - Arnaldo