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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 A809FC433ED for ; Mon, 19 Apr 2021 09:07:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 797E86102A for ; Mon, 19 Apr 2021 09:07:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238489AbhDSJIZ (ORCPT ); Mon, 19 Apr 2021 05:08:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232023AbhDSJIY (ORCPT ); Mon, 19 Apr 2021 05:08:24 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E99EBC061760 for ; Mon, 19 Apr 2021 02:07:54 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id l4so51700286ejc.10 for ; Mon, 19 Apr 2021 02:07:54 -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; bh=pYmNdn17WaFVbSZzxAjZrcjydk4+7qcEdKI8uYhDoCc=; b=jVuU6ug35OHQRuITgQo7roH/PJ5d7X2QWW/1tW3exjd8G59oaFd25xfRl7FI4lB/Pb 9ZagEmSyW4WxtgIJLOzv8g9MDdvPMaSCkDgZJGMlMQZ96kJKPrD6KXKqyTbHvuQ++3y8 BgaYjVGdHRP2bmn0KIfIXBDU80JqfSX9x6rGzS/9D+sxOyanEzfrzwCh7aOuDBUHnlsJ MnaljzpaYGxd2x3MWC16gqsbese919tBmENYYlmzX4dM999tOfwKwgyPzgB6HATTz+S3 wronfPxno4Qr55Rh9DcQKchxwDxHPAtJIat5c8YL8DrtYSuss1ighIDPJQU/LtSxKwK0 OAIw== 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=pYmNdn17WaFVbSZzxAjZrcjydk4+7qcEdKI8uYhDoCc=; b=UJbF19Hc77Giu1/4opsUhw/UrNrReDGNTbEBxhfIJO8O3YmzoEnSLpLBrR2+nkJoFt f1zHn+ae+ESmUh2xFE4U0CYJff718l8t94FlvLjynYqwMmi6D6IACJ8sr9vdnYxeyMfi opJS1NSHeVDFqyj+S4ihmOfzqVTYf+nzEV95dohEeqalsjhRyhkBWUoQ/eUiauQI4jxO Q7g4p4v1jeMdyINyO/2jREXM318YvNmiFHrzvTgtKY8lUS3JI0pDrHFpSLAi132X5ucv GMBIzwYxOrn7ZtNV5Pwe/472iwqWO5LgKjUWikEimCxiBHH98Gxqrc3kqrK1FJTO5Vyc im+A== X-Gm-Message-State: AOAM5332NRrTOHffF4v1BysIu5VWeUuEGiG2TpjAk07nRGoyiNwgKEMF L+dFstBTYLAzDM0varuz4lqomw+aeGyOF5/O X-Google-Smtp-Source: ABdhPJw5GYEyra5w6QAs6I5t3xbqyitgTnBNohWeeKzzPl5kQG4tOKd7ZRWnxHQXCZEIRqiQCPL+rA== X-Received: by 2002:a17:906:2504:: with SMTP id i4mr20151975ejb.297.1618823273539; Mon, 19 Apr 2021 02:07:53 -0700 (PDT) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id f19sm12521084edu.12.2021.04.19.02.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 02:07:52 -0700 (PDT) Date: Mon, 19 Apr 2021 10:07:50 +0100 From: Daniel Thompson To: Yicong Yang Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-pci@vger.kernel.org, alexander.shishkin@linux.intel.com, helgaas@kernel.org, gregkh@linuxfoundation.org, lorenzo.pieralisi@arm.com, will@kernel.org, mark.rutland@arm.com, mathieu.poirier@linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, jonathan.cameron@huawei.com, song.bao.hua@hisilicon.com, john.garry@huawei.com, prime.zeng@huawei.com, liuqi115@huawei.com, zhangshaokun@hisilicon.com, linuxarm@huawei.com Subject: Re: [PATCH RESEND 3/4] docs: Add HiSilicon PTT device driver documentation Message-ID: <20210419090750.g6aeyyrki7fiotxl@maple.lan> References: <1618654631-42454-1-git-send-email-yangyicong@hisilicon.com> <1618654631-42454-4-git-send-email-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1618654631-42454-4-git-send-email-yangyicong@hisilicon.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > +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? 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. Daniel. 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=-13.8 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 EEF1DC433ED for ; Mon, 19 Apr 2021 09:10:00 +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 773E56102A for ; Mon, 19 Apr 2021 09:10:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 773E56102A 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=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:References:Message-ID: Subject:Cc: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=RQjvr/J+j3a0el87hmCET7+W1OPFWytUR2YC2XdVM3k=; b=qvxCZQhuVZFolriyp8Bb6Sw8N tqHTSDxiRuDiS0l4+CS+fnqklenXhYfpX844VH2H+xoEpKi/yAXZMyI4W6u1kDW77MrwmxeKfVu4f l61GVdZ0MO/0xQekQO9Rpfg/7Msa9wbuF9nCIk3QWwdrg6NItWy2eA5IEKDTxnVZWqUSMl9yjsukU jzWneEcL0NBm3nDxVOKjm0K5LhEZC3DXWL7XcfL9Vk4JActEbeqQuIO2yxJdHU55i++g2Cj5UMK3X 2Pg9ksZ4t73JIXdYd//QMKfnyjlVsxICKPSUJWK23yzjI9JS89PnkW5OPSrIFBbctzrtPf5t6cCFh 0y/N3M2dg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYPsw-009WI5-Q9; Mon, 19 Apr 2021 09:08:03 +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 1lYPsv-009WHD-74 for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 09:08:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=pYmNdn17WaFVbSZzxAjZrcjydk4+7qcEdKI8uYhDoCc=; b=l28x27Nri607k0BbZJg4B4C2i4 RbzRmjExnY26HCZqT92JH+1R6z2Ghcol3N2+xlwnupcrOjzSg03SWdnETgJHZemMrgrG8ToFeHG0x zYYX2xU2XtpZsG4y+RCO+b+D+Mg+UyFMlHKipwdxID4+9vH4Tdj02MMurhXaycfm6TLXQCa0xDDIS 452bNC1DSeBpMBAaMRW1WN5QqA5zMHKjj249s9mSNwXZC9F+brzK3AWAkU+2bFshtyhOPGMUMAa9m ZbD2hpjvduslVRuBl1oZ6fEIMdQ4D2Y6ULl8ReVsD2NWK/InmmlIe8+goJom/qjkDH7Qj66wOrPFm 8sB/6JVg==; Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYPsq-00BDXb-6a for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 09:08:00 +0000 Received: by mail-ej1-x62b.google.com with SMTP id r12so51756361ejr.5 for ; Mon, 19 Apr 2021 02:07:54 -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; bh=pYmNdn17WaFVbSZzxAjZrcjydk4+7qcEdKI8uYhDoCc=; b=jVuU6ug35OHQRuITgQo7roH/PJ5d7X2QWW/1tW3exjd8G59oaFd25xfRl7FI4lB/Pb 9ZagEmSyW4WxtgIJLOzv8g9MDdvPMaSCkDgZJGMlMQZ96kJKPrD6KXKqyTbHvuQ++3y8 BgaYjVGdHRP2bmn0KIfIXBDU80JqfSX9x6rGzS/9D+sxOyanEzfrzwCh7aOuDBUHnlsJ MnaljzpaYGxd2x3MWC16gqsbese919tBmENYYlmzX4dM999tOfwKwgyPzgB6HATTz+S3 wronfPxno4Qr55Rh9DcQKchxwDxHPAtJIat5c8YL8DrtYSuss1ighIDPJQU/LtSxKwK0 OAIw== 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=pYmNdn17WaFVbSZzxAjZrcjydk4+7qcEdKI8uYhDoCc=; b=mQyg5qcCv9NjP3xAMtljMl1DsAy64Q0nm7BjIiUpyvexW9vSIILon4LWCeFpvMP8xR 5qKDWyF12eHJavEEkR2kU5GTmBB7TN7UOGdY7jb7er3i/5Nj2m3vl+/eqxVta/4h28A0 siCq3YFQSgL6+CDQlfh3J0e5QWdp1ivLw5NtldWDFz3mgAhsuZRacEyEndrLp6O+ekEl bMkGMwNxUthLUZ9rmUEn+PFu78bJrVe13Fo/Uae3vPJll2oYwPGpmPsj2RvN9zK6pSB/ yVAzAPlhVrIXyobIMYxLsYgLpYiXZG1C/CoKKZIv1Z8uGUAwzRntY4WHPUXzkh6IJdmE psnw== X-Gm-Message-State: AOAM532fN3QpW58a30b6FHO7BmyKBfIKa3RkIlxu9glBbsecpKIWzKGj ALoOKhbjykDo6V2bqH2SNfcKfg== X-Google-Smtp-Source: ABdhPJw5GYEyra5w6QAs6I5t3xbqyitgTnBNohWeeKzzPl5kQG4tOKd7ZRWnxHQXCZEIRqiQCPL+rA== X-Received: by 2002:a17:906:2504:: with SMTP id i4mr20151975ejb.297.1618823273539; Mon, 19 Apr 2021 02:07:53 -0700 (PDT) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id f19sm12521084edu.12.2021.04.19.02.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 02:07:52 -0700 (PDT) Date: Mon, 19 Apr 2021 10:07:50 +0100 From: Daniel Thompson To: Yicong Yang Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-pci@vger.kernel.org, alexander.shishkin@linux.intel.com, helgaas@kernel.org, gregkh@linuxfoundation.org, lorenzo.pieralisi@arm.com, will@kernel.org, mark.rutland@arm.com, mathieu.poirier@linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, jonathan.cameron@huawei.com, song.bao.hua@hisilicon.com, john.garry@huawei.com, prime.zeng@huawei.com, liuqi115@huawei.com, zhangshaokun@hisilicon.com, linuxarm@huawei.com Subject: Re: [PATCH RESEND 3/4] docs: Add HiSilicon PTT device driver documentation Message-ID: <20210419090750.g6aeyyrki7fiotxl@maple.lan> References: <1618654631-42454-1-git-send-email-yangyicong@hisilicon.com> <1618654631-42454-4-git-send-email-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1618654631-42454-4-git-send-email-yangyicong@hisilicon.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_020756_302473_C57F640A X-CRM114-Status: GOOD ( 23.28 ) 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 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? > +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? 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. Daniel. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel