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 X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFC99C433F5 for ; Sun, 5 Sep 2021 21:27:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AF99560F45 for ; Sun, 5 Sep 2021 21:27:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF99560F45 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=BRW1vUBxcavXpBp05bW3kWZYsggIr7hYyZWX/ZGGOrI=; b=h2OQV6KU7RZZwu mLLAKTMPf1KijJa5XMrUbu1l1SD8iGzj8ViKOc/VRiWGhkU5w07OXw3dvc8puPj4IynkV3aw147wp fv/FfyNcKGI0os0AUpv+iO9yHHH1Sf+Ixc471jZmrkeQm2b7/tLhiTJ/iq0G1v6Dicn9GJNX19pKz QgyNZq4qu4y7GdWyZ/RkOZcIiA0SrYxZlvQxZDk4DfKvjg/UNh8HqHj6kNxwzZuLUWNePP7dNaq5r d4EGHqO1ZDUoY/MfRzkNifsAzJTxjSWhzOeZuJ3rg4vK8rYfo3d25ehORSXs2IyLFHuG2s91QGU6p 8IfhW5f29UPg1vOfA7Qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMzd7-00Ga7w-LE; Sun, 05 Sep 2021 21:24:45 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMzcx-00Ga6a-KP for linux-arm-kernel@lists.infradead.org; Sun, 05 Sep 2021 21:24:37 +0000 Received: by mail-wm1-x332.google.com with SMTP id v20-20020a1cf714000000b002e71f4d2026so2679064wmh.1 for ; Sun, 05 Sep 2021 14:24:35 -0700 (PDT) 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=saO2PLp8tH6FyRu31V4/jVR5ahw84Vxja4MZDC54Af0=; b=HuGLq9krOAyeDLV8Id9e23NIi1mJ+xi7hLyyoim9gjVlzT3rl1OnPjr7somRcCbXZA gTHmhNMWe81BFhBXEvxvrs1TCLqlsu2cDioqfIyjc//U5y6+DhOLrIiJbuca+NIE/O0C mx5DVlxoi3plKYC1mshL5LTLh2NI1uXxPCAkguAn7h3tmzxW0/9mWkTi+DFUW01ZgSWs 9KAu0H/D9BBaY3pHZEkD61ph5P1fshXNt6k9c+9MzKnoOTccC9Gk3BcCJp4uctgo0gGw y55iGlT9w7VGEmjyXR9g6E1MVhf29Y8kNK572S03dLoepRsY+dwTwB5UB4vxHfkie7Ob e/7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=saO2PLp8tH6FyRu31V4/jVR5ahw84Vxja4MZDC54Af0=; b=RudHxR/cQNCYSvYssvRS4l0IVPf3lhpwfD4u2PgoYXQON6ywTXircXDKl1+TGr71uO +mzwunCN/uoedPy8Ph7F6cq+mn6Agh7Ues2HME8HCQwf+6e4ijtCU8Ckyao3vbgFWDJi UfySctFkXBXXevDZbXbsu6d9fomF5DhLMxt5ETQCCTUWU6vP4DuAsEl6NIWJA0+BS/fC nifC7kpGh9BoC7blSivfpK0SJS4uQoAbk5Rnh2HMjaKHU0Eyuw23cn6jUl/7Io3ET314 /qTcEvy9mssEZ9iEj4sUaDGVnpovsqRpmUACaJV2yxYhv4nmQ1jeuF+1py7oEEbqGufm Rj9w== X-Gm-Message-State: AOAM532rYbxnl93VoZKtReV7FbeSXKtiWtwA3ySbE/MFmXarmKvTibAx fGu4/H9d3qxCT5Cg4Tl7vfL/VS8olFrAEcjhY5kGhw== X-Google-Smtp-Source: ABdhPJzhDU211jqNtf99d4ch91XmC2+g1ndKtKy3gMf9afmnU8co4OtbBjLSdnPFybOWMwelWwCfAkTng1vDItm0TKI= X-Received: by 2002:a7b:c387:: with SMTP id s7mr8454749wmj.26.1630877074069; Sun, 05 Sep 2021 14:24:34 -0700 (PDT) MIME-Version: 1.0 References: <20210806134109.1182235-1-james.clark@arm.com> <20210806134109.1182235-3-james.clark@arm.com> In-Reply-To: From: Mike Leach Date: Sun, 5 Sep 2021 22:24:23 +0100 Message-ID: Subject: Re: [PATCH v2 2/9] perf cs-etm: Initialise architecture based on TRCIDR1 To: Arnaldo Carvalho de Melo Cc: Suzuki K Poulose , James Clark , Mathieu Poirier , Leo Yan , Coresight ML , linux-perf-users@vger.kernel.org, John Garry , Will Deacon , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210905_142435_711420_1FA5124E X-CRM114-Status: GOOD ( 27.09 ) 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 Fri, 3 Sept 2021 at 12:07, Arnaldo Carvalho de Melo wrote: > > Em Fri, Sep 03, 2021 at 09:55:37AM +0100, Suzuki K Poulose escreveu: > > On 06/08/2021 14:41, James Clark wrote: > > > Currently the architecture is hard coded as ARCH_V8, but from ETMv4.4 > > > onwards this should be ARCH_AA64. > > > > > > Signed-off-by: James Clark > > > --- > > > tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 16 +++++++++++++++- > > > 1 file changed, 15 insertions(+), 1 deletion(-) > > > > > > diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > > > index 187c038caa19..787b19642e78 100644 > > > --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > > > +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > > > @@ -126,6 +126,20 @@ static int cs_etm_decoder__gen_etmv3_config(struct cs_etm_trace_params *params, > > > return 0; > > > } > > > +#define TRCIDR1_TRCARCHMIN_SHIFT 4 > > > +#define TRCIDR1_TRCARCHMIN_MASK GENMASK(7, 4) > > > +#define TRCIDR1_TRCARCHMIN(x) (((x) & TRCIDR1_TRCARCHMIN_MASK) >> TRCIDR1_TRCARCHMIN_SHIFT) > > > > minor nit: Please add a blank line here > > Fixed it > > > > +static enum _ocsd_arch_version cs_etm_decoder__get_etmv4_arch_ver(u32 reg_idr1) > > > +{ > > > + /* > > > + * For ETMv4 if the trace minor version is 4 or more then we can assume > > > + * the architecture is ARCH_AA64 rather than just V8. > > > + * ARCH_V8 = V8 architecture > > > + * ARCH_AA64 = Min v8r3 plus additional AA64 PE features > > > > Does this need to be >= 3 then, to be accurate ? > > > > The comment "reads", minimum v8.3 and any additional features. > > > > Otherwise looks good to me. > Behaviour correctly matches OpenCSD decoder requirements. Reviewed-by: Mike Leach > Didn't have enough coffee, I think, can you please provide this as a > patch? :) > > - Arnaldo -- 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