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=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 AE287C43381 for ; Thu, 21 Mar 2019 02:09:40 +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 6B091218D4 for ; Thu, 21 Mar 2019 02:09:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="u+YHa81v"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MetRX0Fb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B091218D4 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+infradead-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=bombadil.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=uS4Pj59LdpNNNWQp0Rf2dvuRFJf6uKQsech2RZFv5NQ=; b=u+YHa81vB3liXg 86nEvAF2HgUEM5vEaByNVFvZdhXIEPJu2S4Z9rinRWxopqwNKMKP7siiDS6Oi9CwZTFfCjSgOmqP/ sCyK2FU08+gN2lKVDJ1fJ5i95BN0CB3hICl+5dUB83TaA9h/jiVR8vyW+zBSQDeuiuvh4rlKhemDC mYJEQ+i+2qtxOM4D++NLdnUKdKrvQpdEdcRZ5pYyzawJHcKCMuA1AH5E/bkTVtVTBCEz5eDfK2snY cZeJszqW3cJXe1HsxjbfRd62sfrO/TfOzc8LtqdkvZxGAapZiVMvmlMn6H2EimfhENSy5JBAVsQwn /1oQoGiQyGsJU2lXieFA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6n9C-00005n-Rx; Thu, 21 Mar 2019 02:09:34 +0000 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6n98-00005F-Q4 for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2019 02:09:32 +0000 Received: by mail-ot1-x343.google.com with SMTP id e5so3107281otk.12 for ; Wed, 20 Mar 2019 19:09:30 -0700 (PDT) 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:user-agent; bh=RXXjFgQ4kSh1haj12ilofiyo5dCddf6sQWZJ/oZ18SM=; b=MetRX0FbgGojxiV9ezSD90LNzLmToGT689mQfL9tp+t/yhpHC/VSzkZlL6FKX0zAsm oomBN5mYw0/YgEZp2owjkX5wLklEVvvI6RbtrwuzTNQNb9iQ7x4KvJH0Qxd41g+tdgJg A7Y7E7Yc8H4sJL5rC4UZ53XTHY+IfslYqhP0IoTPby884gDrkOlsWaKeexn+65gzdnQW HGTviFS8n6xsu14gMGozDNONan/fz8mm1740GRylfgB9zvzIUWa0lWD6WuJMe0E3HtVi eHmvEhKdnIqibuLD3bbFyqrLfUs4sAm78njn+o43UTmNQ848yNZUcLaDA30NzAB0PQhu UTeA== 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:user-agent; bh=RXXjFgQ4kSh1haj12ilofiyo5dCddf6sQWZJ/oZ18SM=; b=J0rWaWR/M/f+MK+sbo2ahAZa/Ip/nXz/w79eJAbRxENFIxgdzM8js3al+1nASz0k/D fQgplwe15DNCLWgty93hsyN3ROPV/VQCUk+ZcLr7qS/a1LVFGajNSk54p1/LGoa7l3UM kn787gmevvPoSnm/KXWXQxn116WuIuw7mAZDCGLSE6onYbBoQNcuwnrhZ1oWbCpcQ7RJ gi7MfN6LAyewZB/RFHVr47lf8bRF98D5RXJ+AMaUBBKitVO0F1gRL1F9BCKtE0iGbt3Y qfu4jYbCLQzOv19iVYc0CZDHHYNPtaRtyfZfHzfl4R8/0Dfdo3yRVjC+WkXrCYv1CbP/ 5zuQ== X-Gm-Message-State: APjAAAUU3hyC2af6e5LnOOc0I4zqc7lUYpt18QwzxsJrBgzesxdICZAs g0YJIB23KP2w5+mrzqCNlob9TQ== X-Google-Smtp-Source: APXvYqzK1u4fDsj7xhNYltQ622yVydefHuO+AjF2PeEID/NAoXV9LdMr2La/0fbBF1Bv8bN5oyT9BA== X-Received: by 2002:a9d:4d89:: with SMTP id u9mr912146otk.71.1553134169475; Wed, 20 Mar 2019 19:09:29 -0700 (PDT) Received: from leoy-ThinkPad-X240s (li808-42.members.linode.com. [104.237.132.42]) by smtp.gmail.com with ESMTPSA id j131sm1482373oia.37.2019.03.20.19.09.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 19:09:28 -0700 (PDT) Date: Thu, 21 Mar 2019 10:09:22 +0800 From: Leo Yan To: Suzuki K Poulose Subject: Re: [PATCH v2 2/3] coresight: funnel: Support static funnel Message-ID: <20190321020922.GA5571@leoy-ThinkPad-X240s> References: <1553085490-42870-1-git-send-email-shiwanglai@hisilicon.com> <1553085490-42870-3-git-send-email-shiwanglai@hisilicon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190320_190930_932056_EE8BE4CA X-CRM114-Status: GOOD ( 21.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, shiwanglai@hisilicon.com, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, suzhuangluan@hisilicon.com, linux-kernel@vger.kernel.org, xuwei5@hisilicon.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Suzuki, On Wed, Mar 20, 2019 at 01:52:58PM +0000, Suzuki K Poulose wrote: > > > On 20/03/2019 12:38, Wanglai Shi wrote: > > From: Leo Yan > > > > Since CoreSight hardware topology can use a 'hidden' funnel in the > > trace data path, this kind funnel doesn't have register for accessing > > and is used by default from hardware design perspective. Below is an > > example for related hardware topology: > > > > +------+ +------+ > > | cpu0 |->| ETM |-\ > > +------+ +------+ \-> +--------+ +-----+ > > ...... | Funnel |->| ETF |-\ Hidden funnel > > +------+ +------+ /-> +--------+ +-----+ \ | > > | cpu3 |->| ETM |-/ \ V > > +------+ +------+ \-> +--------+ > > | Funnel |-> ... > > +------+ +------+ /-> +--------+ > > | cpu4 |->| ETM |-\ / > > +------+ +------+ \-> +--------+ +-----+ / > > ...... | Funnel |->| ETF |-/ > > +------+ +------+ /-> +--------+ +-----+ > > | cpu7 |->| ETM |-/ > > +------+ +------+ > > > > The CoreSight funnel driver only supports dynamic funnel with > > registration register resource, thus it cannot support for the static > > funnel case and it's impossible to create trace data path for this case. > > > > This patch is to extend CoreSight funnel driver to support both for > > static funnel and dynamic funnel. For the dynamic funnel it reuses the > > code existed in the driver, for static funnel the driver will support > > device probe if without providing register resource and the driver skips > > registers accessing when detect the register base is NULL. > > > > Signed-off-by: Leo Yan > > --- > > Suggested-by: Suzuki K Poulose Will add the tag in next version, and very appreciate you shared me offline the replicator code for reference! > > -static const struct amba_id funnel_ids[] = { > > +static int static_funnel_probe(struct platform_device *pdev) > > +{ > > + int ret; > > + > > + pm_runtime_get_noresume(&pdev->dev); > > + pm_runtime_set_active(&pdev->dev); > > + pm_runtime_enable(&pdev->dev); > > + > > + /* Static funnel do not have programming base */ > > + ret = funnel_probe(&pdev->dev, NULL); > > + > > + if (ret) { > > + pm_runtime_put_noidle(&pdev->dev); > > + pm_runtime_disable(&pdev->dev); > > + } > > + > > + return ret; > > +} > > + > > +static const struct of_device_id static_funnel_match[] = { > > + {.compatible = "arm,coresight-funnel"}, > > There is a potential issue with re-using the "compatible" string > already reserved for the normal programmable funnel. We may handle > a programmable funnel as non-programmable one, which is not good. > > Do we need to use "arm,coresight-static-funnel" ? This suggestion makes sense, will do this. > Otherwise, looks good to me. Thanks for reviewing. Thanks, Leo Yan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel