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.0 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 2D0C5C433DB for ; Fri, 8 Jan 2021 00:52:55 +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 E54A323447 for ; Fri, 8 Jan 2021 00:52:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E54A323447 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=gjDUvGNNM8XmYAaSxnglcwQyxs0yOnVXzz4Yl6V35UY=; b=CjcmJYYgSPMCKb+OJyEAbCMu+ upyOGbCGbXp4DJ+gN8M68w68rENkxLhb9E8D4g6xVlegXdXil0zZwIAyng0Wz6cTwfdCSAQfuNdeu ZkC14oBJLFRAOz+e4x+RbN/zCUSTourHsld2K9YhBMBEV7pnuy5hmjmLBmbdj+3yjHW7H6V9UtXUK pYIXiyesTJhRHhyTdbdsKS7hHB+MK0lN5/WznWeVX9uIBjXrDBy2A2ayW5rQPhsxa15eWbiDCRADT EhAkzFXfXlrX4EL1+GWwEPgGrnA5Y2TCjJvDWous9eglx7Wcqb/XhA38JGGvyoKBrCkwc0ikksj8g 1xwZdzXsw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxfyT-00050n-VA; Fri, 08 Jan 2021 00:49:53 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxfyR-00050O-9a for linux-arm-kernel@lists.infradead.org; Fri, 08 Jan 2021 00:49:52 +0000 Received: by mail-pg1-x52c.google.com with SMTP id c22so6491102pgg.13 for ; Thu, 07 Jan 2021 16:49:50 -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=bWwf6/4j4tVvES7fVpbsX1jLm+cH+7knbN6V1u2/IfA=; b=FuUOoESBvVMOtLaY+nWl466nPXdTItMSrURONIbA7uC2PhHdOCKZmlsGJ718BPoOuf OGeKnQBixA8VYW8BW133gy/wwlUnEpUp9PuuSCsnY/AGIeNKnQ/invNDLvjuIsX7xgyE yzoLaBELBQoiyiuYC8yDef7jRsOSTS4Z/JNj1bItsys4WHT73DPf0sOGwtSH7SLxsNYS a30F9IDMkGrX02gO7LIxldaN9+AtKolbUWeJevYsjs8DsSYvETLzV5DT2r2zwspPjBjl jLapb1iqSa3bxPj9rGlShZCnr9SArJNXHb+8aWy8jV8AWNsIl7oNCze3Na17LSNS3VlV r8dA== 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=bWwf6/4j4tVvES7fVpbsX1jLm+cH+7knbN6V1u2/IfA=; b=d070q0IK1fsiFtcwxiakcXw3J2Q8m2qIqZllD+4pH05Omxc4picN3Nbxg0RuYi78EI 7yM62fgCmiGQOxcuFPQbZzkl8IcM0YM8LkPWoPKWBQu3koOwdjqIcnnRWn/3snrEB9PP DwgPCkuMFkK//cx73zYIy5aDOjZjFvNFt8+WHEX2vCZi8PHz2qUj4w2I1AwOZmhjgjmE +bG3uRM9nVCwVDGQ4NOFh2o6+ng88heS0zsuxTKOx5RsxkOFvUceKdJOyp2dhT0Nwcbd 0yZpmwXbm6aRqmemcudz7gTi9TeIo6Odum5QFAtlcHeaLz4KdicfxJR0OxB7wUxMfY/v sbrQ== X-Gm-Message-State: AOAM5311fvDi1vnIggpq5I0SYI87cD6OeMkqfpy66IU6Kd6Iq5RqLZJM JkI0olBKhuWETV246Xf0vES+RQ== X-Google-Smtp-Source: ABdhPJxL7i4DsWOU0fETM4nqI82E7mp5+9hr0CKEiGTdF2QrVsGhC8Tr+k1fHZg0LjBPNNyXikKJ9w== X-Received: by 2002:a62:ac09:0:b029:1a9:dd65:2f46 with SMTP id v9-20020a62ac090000b02901a9dd652f46mr1089803pfe.15.1610066988994; Thu, 07 Jan 2021 16:49:48 -0800 (PST) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id t25sm7480075pgv.30.2021.01.07.16.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 16:49:48 -0800 (PST) Date: Thu, 7 Jan 2021 17:49:46 -0700 From: Mathieu Poirier To: Suzuki K Poulose Subject: Re: [PATCH v6 22/26] coresight: etm4x: Run arch feature detection on the CPU Message-ID: <20210108004946.GF43045@xps15> References: <20210107123859.674252-1-suzuki.poulose@arm.com> <20210107123859.674252-23-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210107123859.674252-23-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_194951_691285_80E0021A X-CRM114-Status: GOOD ( 22.28 ) 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, leo.yan@linaro.org, liuqi115@huawei.com, linux-arm-kernel@lists.infradead.org, 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, Jan 07, 2021 at 12:38:55PM +0000, Suzuki K Poulose wrote: > As we are about to add support for system register based devices, > we don't get an AMBA pid. So, the detection code could check > the system registers running on the CPU to check for the architecture > specific features. Thus we move the arch feature detection to > run on the CPU. We cannot always read the PID from the HW (i.e even > for AMBA devices), as the as the PID could be overridden by DT for s/as the as the/as the I made the change. > broken devices. So, use the PID from AMBA layer if available. > > Cc: Mathieu Poirier > Cc: Mike Leach > Cc: liuqi115@huawei.com > Signed-off-by: Suzuki K Poulose > --- > drivers/hwtracing/coresight/coresight-etm4x-core.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c > index 228845f6fdd8..f4fbb65b4cc1 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c > @@ -60,6 +60,7 @@ static u64 etm4_get_access_type(struct etmv4_config *config); > static enum cpuhp_state hp_online; > > struct etm4_init_arg { > + unsigned int pid; > struct etmv4_drvdata *drvdata; > struct csdev_access *csa; > }; > @@ -884,6 +885,8 @@ static void etm4_init_arch_data(void *info) > etm4_os_unlock_csa(drvdata, csa); > etm4_cs_unlock(drvdata, csa); > > + etm4_check_arch_features(drvdata, init_arg->pid); > + > /* find all capabilities of the tracing unit */ > etmidr0 = etm4x_relaxed_read32(csa, TRCIDR0); > > @@ -1750,6 +1753,7 @@ static int etm4_probe(struct device *dev, void __iomem *base, u32 etm_pid) > > init_arg.drvdata = drvdata; > init_arg.csa = &desc.access; > + init_arg.pid = etm_pid; > > if (smp_call_function_single(drvdata->cpu, > etm4_init_arch_data, &init_arg, 1)) > @@ -1794,8 +1798,6 @@ static int etm4_probe(struct device *dev, void __iomem *base, u32 etm_pid) > drvdata->boot_enable = true; > } > > - etm4_check_arch_features(drvdata, etm_pid); > - > return 0; > } > > -- > 2.24.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel