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.3 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,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 B7F66C433ED for ; Mon, 19 Apr 2021 13:14:55 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 18283613AE for ; Mon, 19 Apr 2021 13:14:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18283613AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=hisilicon.com 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=s750v9TT1WMsjTZPAyOQ1F5M/ZbVQHygkyq2Wg6BxQQ=; b=W+YFjNYqnj9fwDIXHnxrGn2Jv 3VQn+0+HBiy5bwH1UV6N1hcYi7xZL+XcCodwTk8LRyKDpSKGK51jGkGvQ/5yLsc3P5Muol/S9/Si4 PKLtnSLWIgd/0Ey/NzmZ68rft+HeTIFXqQw7LE9GdO7NUb3f3B+OIJ556sux33rCzRT9FpdqsGP2R DAhvzSBMiCkxDXsjww5RG9MyskL52Q47naetWt2RD+PhaU9LSyj8SbCkiEFc3Hbn20HwEzakzkX0e /cENVstQHHFuUVTrgmubIVsk6l8DuhEG9bK0vc2efb95CLvD1hTENm9EE5MfeLRsomUzIbrJDWu7/ YU8wAU+SA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYTiI-009vvL-Nt; Mon, 19 Apr 2021 13:13:19 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYTiF-009vv6-T6 for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 13:13:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:CC:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=T3j0sI2uXyB/qtDxjvS97cN+K/3Lv1eolHYwBApk0QY=; b=T935Avce3NlfGHHlSEwOvdVe0h bp3np+g9wKPOOJHEoFEM//PAM6KwhsttalfYPiX2GJpSBci5jszpVPqETTYr/ugFKq0m5wKrWMMYX 0sHb808JDLYBwzFBUUjbbxOzB3QYXzjgyG29a8is3s95F1uk0+vWn/+G+KMv0oyl8lTIUFYbbIyFP DACgc84gFKlPoPvSY2N2dDMyOSBnwT8yKaMr4OIZcPiLcGLUfn+jWHun9SgGLX+AXOO3xKLkL9Rpb tcNa0vpcTsgtQKhiLokqHY9LH04Ej2KnKsB25TMergY3IzKe7pr5Wqmz/l+sFZtnfWJJpXvuBNoKc 1HTdXmTg==; Received: from szxga04-in.huawei.com ([45.249.212.190]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYTi9-00BNqs-Jj for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 13:13:14 +0000 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FP6d05Hd3z1BGKt; Mon, 19 Apr 2021 21:10:44 +0800 (CST) Received: from [127.0.0.1] (10.69.38.196) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Mon, 19 Apr 2021 21:12:57 +0800 Subject: Re: [PATCH RESEND 3/4] docs: Add HiSilicon PTT device driver documentation To: Daniel Thompson CC: , , , , , , , , , , , , , , , , , , , , References: <1618654631-42454-1-git-send-email-yangyicong@hisilicon.com> <1618654631-42454-4-git-send-email-yangyicong@hisilicon.com> <20210419090750.g6aeyyrki7fiotxl@maple.lan> From: Yicong Yang Message-ID: Date: Mon, 19 Apr 2021 21:12:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20210419090750.g6aeyyrki7fiotxl@maple.lan> X-Originating-IP: [10.69.38.196] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_061310_018685_210894A3 X-CRM114-Status: GOOD ( 23.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 2021/4/19 17:07, Daniel Thompson wrote: > On Sat, Apr 17, 2021 at 06:17:10PM +0800, Yicong Yang wrote: >> Document the introduction and usage of HiSilicon PTT device driver. >> >> Signed-off-by: Yicong Yang >> --- >> Documentation/trace/hisi-ptt.rst | 326 +++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 326 insertions(+) >> create mode 100644 Documentation/trace/hisi-ptt.rst >> >> diff --git a/Documentation/trace/hisi-ptt.rst b/Documentation/trace/hisi-ptt.rst >> new file mode 100644 >> index 0000000..f093846 >> --- /dev/null >> +++ b/Documentation/trace/hisi-ptt.rst >> @@ -0,0 +1,326 @@ >> [...] >> +On Kunpeng 930 SoC, the PCIe Root Complex is composed of several >> +PCIe cores. Each PCIe core includes several Root Ports and a PTT >> +RCiEP, like below. The PTT device is capable of tuning and >> +tracing the link of the PCIe core. >> +:: >> + +--------------Core 0-------+ >> + | | [ PTT ] | >> + | | [Root Port]---[Endpoint] >> + | | [Root Port]---[Endpoint] >> + | | [Root Port]---[Endpoint] >> + Root Complex |------Core 1-------+ >> + | | [ PTT ] | >> + | | [Root Port]---[ Switch ]---[Endpoint] >> + | | [Root Port]---[Endpoint] `-[Endpoint] >> + | | [Root Port]---[Endpoint] >> + +---------------------------+ >> + >> +The PTT device driver cannot be loaded if debugfs is not mounted. > > This can't be right can it? Obviously debugfs must be enabled but why > mounted? > just mention the limit as I'm not sure it's always be mounted. > >> +Each PTT device will be presented under /sys/kernel/debugfs/hisi_ptt >> +as its root directory, with name of its BDF number. >> +:: >> + >> + /sys/kernel/debug/hisi_ptt/::. >> + >> +Tune >> +==== >> + >> +PTT tune is designed for monitoring and adjusting PCIe link parameters (events). >> +Currently we support events in 4 classes. The scope of the events >> +covers the PCIe core to which the PTT device belongs. >> + >> +Each event is presented as a file under $(PTT root dir)/$(BDF)/tune, and >> +mostly a simple open/read/write/close cycle will be used to tune >> +the event. >> +:: >> + $ cd /sys/kernel/debug/hisi_ptt/$(BDF)/tune >> + $ ls >> + qos_tx_cpl qos_tx_np qos_tx_p >> + tx_path_rx_req_alloc_buf_level >> + tx_path_tx_req_alloc_buf_level >> + $ cat qos_tx_dp >> + 1 >> + $ echo 2 > qos_tx_dp >> + $ cat qos_tx_dp >> + 2 >> + >> +Current value (numerical value) of the event can be simply read >> +from the file, and the desired value written to the file to tune. > > I saw that this RFC asks about whether debugfs is an appropriate > interface for the *tracing* capability of the platform. Have similar > questions been raised about the tuning interfaces? > yes. as well. > It looks to me like tuning could be handled entirely using sysfs > attributes. I think trying to handle these mostly decoupled feature > in the same place is likely to be a mistake. > Tuning and tracing are two separate functions and it does make sense to decouple them. Thanks for the advice, we can make tuning using sysfs attributes as debugfs is not encouraged. Regards, Yicong > > Daniel. > > . > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel