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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS 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 8E576C43381 for ; Mon, 4 Mar 2019 17:29:33 +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 5E67D2070B for ; Mon, 4 Mar 2019 17:29:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="h1CfEv8Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E67D2070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NGK6LTQJeV7KVcg0z3EhVnVwEowJs43RCIgrhXjs6rs=; b=h1CfEv8ZMC4QImDIx0E2534QN MfXq84uaab3eLBDyJq2WCkG+j90CimSeyig09uRmEBd1DqO/IDsDi+kDwYPDL6rYMsUVEi6gpFSSS 7q5Qa7xihPJIY5pjx/48M54YHsRgSXDDGR5ICDufHefzhQx32Fvu3FnXGODse+sAFADZ+Q1g6NwZP 84eQ6ENbnyl9ZcmU6CNUurrSwqYEV4W4Za1fdO4IDwGy7nCtu5bm7vebAu1BF6q6SSFui/X4Lkmp8 jF6t9pwRu5yZdYTQS1ePLNYL6KCj3WUYa5OtEyFdggc8hwJzqOJ8r/MKrN/+bAxs8c+M9R/Jj8qul 3ZUKsdqFA==; 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 1h0rP9-0003kf-MQ; Mon, 04 Mar 2019 17:29:31 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0rP5-0003jo-Rc for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2019 17:29:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8CFA6A78; Mon, 4 Mar 2019 09:29:25 -0800 (PST) Received: from [10.1.196.93] (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 988703F703; Mon, 4 Mar 2019 09:29:23 -0800 (PST) Subject: Re: [PATCH v2] dts: arm64: add CoreSight trace support for hi3660 To: mathieu.poirier@linaro.org, leo.yan@linaro.org References: <6496F4728C09F6479CFF21A8E67D33D568F32660@dggema525-mbx.china.huawei.com> <20190302125955.GA11385@leoy-ThinkPad-X240s> From: Suzuki K Poulose Message-ID: <9109e498-0cd9-0b81-15a0-2208d4282359@arm.com> Date: Mon, 4 Mar 2019 17:29:22 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190304_092927_906169_AFE93619 X-CRM114-Status: GOOD ( 22.48 ) 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, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, john.stultz@linaro.org, xuwei5@huawei.com, suzhuangluan@hisilicon.com, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 04/03/2019 17:18, Mathieu Poirier wrote: > On Sat, 2 Mar 2019 at 06:00, Leo Yan wrote: >> >> 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? > > Leo, thanks for testing this out. Shiwanglai, please add Suzuki and > myself to future revision of this set - this will help you getting a > timely response for your work. > > As Leo pointed out we already have support for replicators that don't > have a register map and the same thing should be done in this case. > But contrary to what was done for replicators, I think we should keep > the drivers in the same file as Russell did here[1]. That way we can > keep all things funnel at the same place and reduce the amount of > kernel configuration options. I back that. I have already merged the static and programmable replicators into one and this should be out here soon. So, I back the single driver approach for funnels. Cheers Suzuki > > Regards, > Mathieu > > [1]. https://elixir.bootlin.com/linux/latest/source/drivers/tty/serial/amba-pl011.c#L2819 > >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel