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=-15.2 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=unavailable 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 B423DC64E7B for ; Mon, 30 Nov 2020 21:20:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 20D732076A for ; Mon, 30 Nov 2020 21:20:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OoNOjUaJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PYGaSkx+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20D732076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=htxwRut/dMKsucx0VT7b3HD/bVdZzXl/q1dedzOFIH0=; b=OoNOjUaJvsrSbewLPf2JAWxEq +FmGIm8YDo9Pf7uNJizEkgdXXBWXhC6V7jUz37RaMFp6MPQTfKBHL3KhJ3MK4JagVl49PbIE21sf6 jZ4x7X2ey6RQDwBTD3TTAmQP3Ik1jfxFcmEZDdryig7L/O77yL+WVlp9UfUK2Iwu5VRqmlTwoOJvg p2LzLDuBCUjWCW0/WqEE+KeEHQr6+Rbt6pLbkaBfBpS/ui8xGicYGfDxTchlfoUyyW4UTxs15EB5d BOcS00NTZlndLev8URT+zTgtMcfwsjJjzjU6wUCtL0PNrJh/4vPdHrK8nBlf8DH/WmP2xIyemc6MB ec0zEfSFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjqZn-0005cQ-E4; Mon, 30 Nov 2020 21:19:15 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjqZk-0005b1-Of for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 21:19:13 +0000 Received: by mail-pl1-x641.google.com with SMTP id x15so7215403pll.2 for ; Mon, 30 Nov 2020 13:19:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=R+fRkUoQp+Unl2rwWqZSXKuCttfMlLMAzbaR7xc5JoE=; b=PYGaSkx+R23+S+lfB9W0YiljksUoh0XjND8T8xEmQOGzwp2vDmPXxTepNqM2mD3qKX VcETzGLoSFrWbezZ22URw73NdNvN3Vja52iDl4wCJ0QP7ZTx1ylKVrEFx9p3jMZpdAJx 94IZDENfmbWw2JAI1acwWhgdVvFpbOt/qwxFL2lV6ya/A7J/HJcbrMZWSA6cDSG8uPCG djQQMFysUB4g35Wn/U2xQqL2XByKkm5+aFCZJ0svTQKJ4p0hziIMtXGjUT0WMijIRjEo UrH3TM8BpJ5M5kSZjrs5fGz884r4okKUZxG6R6f0VlGChYzvSoMT39nZryPFHGP+8CcZ k3WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=R+fRkUoQp+Unl2rwWqZSXKuCttfMlLMAzbaR7xc5JoE=; b=PVX+LcAaNZovsT6ZW20tLEiL7v0kSNEgGd8A8ywryhbaKINzgqyTx5GUPvBZgu2lOX Wm3CkvOOnz7SPOJsrzs7R1vII1+PcBPMjE8IlXTgQc7dXv8qM1OG+zyX8kUkOihIdDaX gyLhGc3/ccROLmSjq41E7T79Os3VJOfBOADJodGQOlHWenXmIH2UjWgX113HV3hd20Zj p29OKA/4qT3GlJthXYQdPRzUhY/2LbweYWlY+AfFtJtCBnPEGu8KcWt0s7wHht1zwewe UVPhH/6UQXWt5ATtKFcwCoEx1O4lD49nrVsmky3kUrW29f6dVBRvGF9wfIMcDEoZOrG1 qRNA== X-Gm-Message-State: AOAM530o8mPYQzABGGv51qgWjhsTGlWnRvhr5VXeHO7YDGZRpiiABeVN q5d51U08ciqM6hrbmPGeKcdzk6w8SP2qBWi/ X-Google-Smtp-Source: ABdhPJzgkoi3AlDuVfVbDJ3UWGzkwcp38mTJMkGAgZ1nj+CuxcyLomrB2dXhurqbsKDGdRhPfz2JVg== X-Received: by 2002:a17:902:6acc:b029:d8:c6ee:6d6c with SMTP id i12-20020a1709026accb02900d8c6ee6d6cmr20684450plt.7.1606771150937; Mon, 30 Nov 2020 13:19:10 -0800 (PST) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id gp14sm400005pjb.6.2020.11.30.13.19.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 13:19:10 -0800 (PST) Date: Mon, 30 Nov 2020 14:19:08 -0700 From: Mathieu Poirier To: Suzuki K Poulose Subject: Re: [PATCH v4 11/25] coresight: etm4x: Define DEVARCH register fields Message-ID: <20201130211908.GG1092947@xps15> References: <20201119164547.2982871-1-suzuki.poulose@arm.com> <20201119164547.2982871-12-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201119164547.2982871-12-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_161912_872494_D3DCDC52 X-CRM114-Status: GOOD ( 20.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: anshuman.khandual@arm.com, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jonathan.zhouwen@huawei.com, mike.leach@linaro.org 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, Nov 19, 2020 at 04:45:33PM +0000, Suzuki K Poulose wrote: > Define the fields of the DEVARCH register for identifying > a component as an ETMv4.x unit. Going forward, we use the > DEVARCH register for the component identification, rather > than the TRCIDR3. > > Cc: Mathieu Poirier > Cc: Mike Leach > Signed-off-by: Suzuki K Poulose > --- > .../coresight/coresight-etm4x-core.c | 4 +- > drivers/hwtracing/coresight/coresight-etm4x.h | 42 +++++++++++++++++++ > 2 files changed, 44 insertions(+), 2 deletions(-) Reviewed-by: Mathieu Poirier > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c > index c2499b62e64e..6f776f075602 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c > @@ -1622,8 +1622,8 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) > static struct amba_cs_uci_id uci_id_etm4[] = { > { > /* ETMv4 UCI data */ > - .devarch = 0x47704a13, > - .devarch_mask = 0xfff0ffff, > + .devarch = ETM_DEVARCH_ETMv4x_ARCH, > + .devarch_mask = ETM_DEVARCH_ID_MASK, > .devtype = 0x00000013, > } > }; > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h > index 6591a59c1012..d8f047547a36 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x.h > +++ b/drivers/hwtracing/coresight/coresight-etm4x.h > @@ -498,6 +498,48 @@ > ETM_MODE_EXCL_KERN | \ > ETM_MODE_EXCL_USER) > > +/* > + * TRCDEVARCH Bit field definitions > + * Bits[31:21] - ARCHITECT = Always Arm Ltd. > + * * Bits[31:28] = 0x4 > + * * Bits[27:21] = 0b0111011 > + * Bit[20] - PRESENT, Indicates the presence of this register. > + * > + * Bit[19:16] - REVISION, Revision of the architecture. > + * > + * Bit[15:0] - ARCHID, Identifies this component as an ETM > + * * Bits[15:12] - architecture version of ETM > + * * = 4 for ETMv4 > + * * Bits[11:0] = 0xA13, architecture part number for ETM. > + */ > +#define ETM_DEVARCH_ARCHITECT_MASK GENMASK(31, 21) > +#define ETM_DEVARCH_ARCHITECT_ARM ((0x4 << 28) | (0b0111011 << 21)) > +#define ETM_DEVARCH_PRESENT BIT(20) > +#define ETM_DEVARCH_REVISION_SHIFT 16 > +#define ETM_DEVARCH_REVISION_MASK GENMASK(19, 16) > +#define ETM_DEVARCH_REVISION(x) \ > + (((x) & ETM_DEVARCH_REVISION_MASK) >> ETM_DEVARCH_REVISION_SHIFT) > +#define ETM_DEVARCH_ARCHID_MASK GENMASK(15, 0) > +#define ETM_DEVARCH_ARCHID_ARCH_VER_SHIFT 12 > +#define ETM_DEVARCH_ARCHID_ARCH_VER_MASK GENMASK(15, 12) > +#define ETM_DEVARCH_ARCHID_ARCH_VER(x) \ > + (((x) & ETM_DEVARCH_ARCHID_ARCH_VER_MASK) >> ETM_DEVARCH_ARCHID_ARCH_VER_SHIFT) > + > +#define ETM_DEVARCH_MAKE_ARCHID_ARCH_VER(ver) \ > + (((ver) << ETM_DEVARCH_ARCHID_ARCH_VER_SHIFT) & ETM_DEVARCH_ARCHID_ARCH_VER_MASK) > + > +#define ETM_DEVARCH_ARCHID_ARCH_PART(x) ((x) & 0xfffUL) > + > +#define ETM_DEVARCH_MAKE_ARCHID(major) \ > + ((ETM_DEVARCH_MAKE_ARCHID_ARCH_VER(major)) | ETM_DEVARCH_ARCHID_ARCH_PART(0xA13)) > + > +#define ETM_DEVARCH_ARCHID_ETMv4x ETM_DEVARCH_MAKE_ARCHID(0x4) > + > +#define ETM_DEVARCH_ID_MASK \ > + (ETM_DEVARCH_ARCHITECT_MASK | ETM_DEVARCH_ARCHID_MASK | ETM_DEVARCH_PRESENT) > +#define ETM_DEVARCH_ETMv4x_ARCH \ > + (ETM_DEVARCH_ARCHITECT_ARM | ETM_DEVARCH_ARCHID_ETMv4x | ETM_DEVARCH_PRESENT) > + > #define TRCSTATR_IDLE_BIT 0 > #define TRCSTATR_PMSTABLE_BIT 1 > #define ETM_DEFAULT_ADDR_COMP 0 > -- > 2.24.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel