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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, 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 0405DC43381 for ; Sat, 2 Mar 2019 13:00:15 +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 6B24420838 for ; Sat, 2 Mar 2019 13:00:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vCkbb/Mi"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Z4bIadvP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B24420838 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=ypTLX0dOBdBkP9+5Cla7CNzAcP0aMecS8HcaXntHFTY=; b=vCkbb/MiZznGB2 XCy0WF/XQuDl0b0KBa+5ZJ2qV70AvNhEZy6xyYZFeuDK6So8hoDRMJlfCGZjFc+dZlQknH9zdXwms AhMY9pRLRqs46/Y410AHN3Jo9AMW5ZPfaQju6w+ikc3oH9dn4SAmj0ok2k1jQWouDj2CDJS84E7Nz Z0RSZwiUvXOPlCdbbzlN68o48TzIZc4OD4D6UjFo5d65wzq4MJIpg/o14aqCvm45aGZLn1zjgvkiQ krR9lgg5PQy4MdA5w4DupVJVlsmQFhONZ2QDInkQS79q3mn/FOrB0s40ZWbTh4VjdAiIu6d5sZqpU Gp77YaC927QvyBqbUYTA==; 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 1h04FM-0001oL-Py; Sat, 02 Mar 2019 13:00:08 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h04FI-00014b-K2 for linux-arm-kernel@lists.infradead.org; Sat, 02 Mar 2019 13:00:06 +0000 Received: by mail-pf1-x444.google.com with SMTP id h1so274156pfo.7 for ; Sat, 02 Mar 2019 05:00:03 -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:user-agent; bh=/wTns5QPuDo+J1NyvXOlmOIqmrL7mvCVtWAYA/U/wJM=; b=Z4bIadvPW/HuFXuCIpvqWYj/A3riHF0fv21vsBYp3NBjT6VRHx3JtYkpTLYHjy6vkc CISJmoM8QPWBUq+OrPX55pKmf9JfzFywLWcV8ToODMuRMvD9UWcldkEsDaT1CZpqUqix h2OjDzQsjq46Uj2HCi+9JTT3yhK6Eozo/TWDBU/EP7CK45/hE+mjgAgof1CTtXNwc0ns 8uBdvGT1FfZDEVbirjJ+cewF1WyLbrIdmqrH7++N/X5eOtWZklh9PTRiX0bd51fe9v1D FgKlBnalUiNJlo/0cg2oSODh0ysF/rFPHEr4aZpBdnHn10BDwwLhiAEb28cv1zrCaDQq fL7g== 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=/wTns5QPuDo+J1NyvXOlmOIqmrL7mvCVtWAYA/U/wJM=; b=ChRipoXbTIzLAn6xS2Dejqxr+0YSFL3KbYi5sABxp8Tc4IGmyjkzYQLml8oSL00iM6 luOA0BzOJ62BMTQsGaoYwGqLEIiJM6InIOFZ5F0GbfWanqEZpt3tSsonVXo9Q3j3Wqq9 ltqDLMHYffGBgWdAzHMxqg9DTYz/eqDba1y4DH1Jy6If99yEMSb4xDA7UzP+eHCgTTcp KuGCNcG+MkVFr5YbUHXpwEX6FvR90iEbBoYasIfLXq5meM3XkHV11E1z8MDF6KW8FOKo SLmeSSqNmbncthyFC1kkpZyYEU6+q+fK7CP8kA/u4Sq7fKY+aLhRP83jc6B2KY8ybCyf WBcg== X-Gm-Message-State: APjAAAX7qBTKEq8BbIzkEBKnP9pSuRNx0wxDZqKTPJsEvhbm0InY5Dyf Bo1z3VXcMxaFcyNrKtJeDLhRPw== X-Google-Smtp-Source: APXvYqymuon4VNkVPFWuNwbmk7MVQPD959f3S92mw0Vf2eh0xC/Rr6R9tB5lEH7pjWnNEZcsEA+Gjw== X-Received: by 2002:a63:2b03:: with SMTP id r3mr9389634pgr.1.1551531602937; Sat, 02 Mar 2019 05:00:02 -0800 (PST) Received: from leoy-ThinkPad-X240s (li1206-191.members.linode.com. [45.79.107.191]) by smtp.gmail.com with ESMTPSA id z77sm1492048pfi.155.2019.03.02.04.59.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Mar 2019 05:00:01 -0800 (PST) Date: Sat, 2 Mar 2019 20:59:55 +0800 From: Leo Yan To: Shiwanglai Subject: Re: [PATCH v2] dts: arm64: add CoreSight trace support for hi3660 Message-ID: <20190302125955.GA11385@leoy-ThinkPad-X240s> References: <6496F4728C09F6479CFF21A8E67D33D568F32660@dggema525-mbx.china.huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6496F4728C09F6479CFF21A8E67D33D568F32660@dggema525-mbx.china.huawei.com> 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-20190302_050004_677379_B88ECBE6 X-CRM114-Status: GOOD ( 15.20 ) 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" , "coresight@lists.linaro.org" , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "john.stultz@linaro.org" , "xuwei \(O\)" , Suzhuangluan , "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 On Sat, Mar 02, 2019 at 09:45:22AM +0000, Shiwanglai wrote: [...] > > + /* Top internals */ > > + funnel@ec031000 { > > + compatible = "arm,coresight-funnel", "arm,primecell"; > > + reg = <0 0xec031000 0 0x1000>; > > + clocks = <&crg_ctrl HI3660_PCLK>; > > + clock-names = "apb_pclk"; > > + > > + out-ports { > > + port { > > + top_funnel_out: endpoint { > > + remote-endpoint = > > + <&top_etf_in>; > > + }; > > + }; > > + }; > > + > > + in-ports { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + port@0 { > > + reg = <0>; > > + top_funnel_in0: endpoint { > > + remote-endpoint = > > + <&cluster0_etf_out>; > > + }; > > + }; > > + > > + port@1 { > > + reg = <0>; > > Here should s/<0>/<1>; otherwise DTC will complain warning for mismatching between 'port@1' and 'reg = <0>'. > -- if reg set to 1, then there's no data output from cluster 1 to top. Thanks for the info, Wanglai. Now I see why write as it is. I can confirm if directly use your patch with perf with mainline kernel I can capture CoreSight trace data successfully on Hikey960 board. But since this DT binding will introduce DTC warning, I personally think we can improve for this with below method: We can create a funnel node named "funnel_combo", and we don't need to specify register address range for it; and cluster 0 and cluster 1 will output to "funnel_combo" and "funnel_combo" will output to the top funnel. Thus the DT binding will write as below. To support for a funnel without any register address range (we have support replicator like this mode), we also need to extend the driver drivers/hwtracing/coresight/coresight-funnel.c. Mathieu, Mike, Suzuki, could you help confirm this is the right direction we should move forward to? ---8<--- /* An invisible combo funnel between clusters and top funnel */ funnel_combo { compatible = "arm,coresight-funnel"; clocks = <&crg_ctrl HI3660_PCLK>; clock-names = "apb_pclk"; out-ports { port { combo_funnel_out: endpoint { remote-endpoint = <&top_funnel_in>; }; }; }; in-ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; combo_funnel_in0: endpoint { remote-endpoint = <&cluster0_etf_out>; }; }; port@1 { reg = <1>; combo_funnel_in1: endpoint { remote-endpoint = <&cluster1_etf_out>; }; }; }; }; /* Top internals */ funnel@ec031000 { compatible = "arm,coresight-funnel", "arm,primecell"; reg = <0 0xec031000 0 0x1000>; clocks = <&crg_ctrl HI3660_PCLK>; clock-names = "apb_pclk"; out-ports { port { top_funnel_out: endpoint { remote-endpoint = <&top_etf_in>; }; }; }; in-ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; top_funnel_in: endpoint { remote-endpoint = <&combo_funnel_out>; }; }; }; }; --->8--- [...] Thanks, Leo Yan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel