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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E1250EB64D7 for ; Fri, 16 Jun 2023 08:40:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4GrYT2tsILFr40E+52y+EL2ut8Ao1niyVpBg7K2g2/A=; b=xORvYBK4+TU6JH 6rVQQB3h9e7/8K++1CMNbJT8tIP8H8/V/m/68/vlnJPUkyelHmsnWd6djZm/CJGNcI8M23gqsie86 X2dSAhjGm6Vpw6nK+/xjsp0/LhDVop9Pdy25J5HMD5VwaQMknOD6F1v6xl9wbqsbKZ3pWmT99Kj5Z kTlxCWtU97VXZsAyzWhy5vThcFiPNgI7MPbzr2drRXQDaErFl8z6MMIcMvZsyzNYPIi3KS5HLZFy1 I2IkuTIK/4ocyTVjalXLY7eLgpTvAOO/NolAMj+VH9QqSJ+ARARA4sVkOuITHtdQhnui0a97HXJ/v 94jnGcHKVnDigcTpHE3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qA50A-00HIZT-2d; Fri, 16 Jun 2023 08:40:14 +0000 Received: from out30-99.freemail.mail.aliyun.com ([115.124.30.99]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qA507-00HIWI-1b for linux-arm-kernel@lists.infradead.org; Fri, 16 Jun 2023 08:40:13 +0000 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R921e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0VlFJRoU_1686904798; Received: from 30.240.112.107(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VlFJRoU_1686904798) by smtp.aliyun-inc.com; Fri, 16 Jun 2023 16:40:00 +0800 Message-ID: <204e3891-c041-53ae-a965-f3abec2cc091@linux.alibaba.com> Date: Fri, 16 Jun 2023 16:39:57 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: [PATCH v6 0/4] drivers/perf: add Synopsys DesignWare PCIe PMU driver support Content-Language: en-US To: chengyou@linux.alibaba.com, kaishen@linux.alibaba.com, helgaas@kernel.org, yangyicong@huawei.com, will@kernel.org, Jonathan.Cameron@huawei.com, baolin.wang@linux.alibaba.com, robin.murphy@arm.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, rdunlap@infradead.org, mark.rutland@arm.com, zhuo.song@linux.alibaba.com References: <20230606074938.97724-1-xueshuai@linux.alibaba.com> From: Shuai Xue In-Reply-To: <20230606074938.97724-1-xueshuai@linux.alibaba.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230616_014011_711734_57EADFDD X-CRM114-Status: GOOD ( 28.06 ) 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 2023/6/6 15:49, Shuai Xue wrote: > changes since v5: > - Rewrite the commit log to follow policy in pci_ids.h (Bjorn Helgaas) > - return error code when __dwc_pcie_pmu_probe failed (Baolin Wang) > - call 'cpuhp_remove_multi_state()' when exiting the driver. (Baolin Wang) > - pick up Review-by tag from Baolin for Patch 1 and 3 > > changes since v4: > > 1. addressing commens from Bjorn Helgaas: > - reorder the includes by alpha > - change all macros with upper-case hex > - change ras_des type into u16 > - remove unnecessary outer "()" > - minor format changes > > 2. Address commensts from Jonathan Cameron: > - rewrite doc and add a example to show how to use lane event > > 3. fix compile error reported by: kernel test robot > - remove COMPILE_TEST and add depend on PCI in kconfig > - add Reported-by: kernel test robot > > Changes since v3: > > 1. addressing comments from Robin Murphy: > - add a prepare patch to define pci id in linux/pci_ids.h > - remove unnecessary 64BIT dependency > - fix DWC_PCIE_PER_EVENT_OFF/ON macro > - remove dwc_pcie_pmu struct and move all its fileds into dwc_pcie_rp_info > - remove unnecessary format field show > - use sysfs_emit() instead of all the assorted sprintf() and snprintf() calls. > - remove unnecessary spaces and remove unnecessary cast to follow event show convention > - remove pcie_pmu_event_attr_is_visible > - fix a refcout leak on error branch when walk pci device in for_each_pci_dev > - remove bdf field from dwc_pcie_rp_info and calculate it at runtime > - finish all the checks before allocating rp_info to avoid hanging wasted memory > - remove some unused fields > - warp out control register configuration from sub function to .add() > - make function return type with a proper signature > - fix lane event count enable by clear DWC_PCIE_CNT_ENABLE field first > - pass rp_info directly to the read_*_counter helpers and in start, stop and add callbacks > - move event type validtion into .event_init() > - use is_sampling_event() to be consistent with everything else of pmu drivers > - remove unnecessary dev_err message in .event_init() > - return EINVAL instead EOPNOTSUPP for not a valid event > - finish all the checks before start modifying the event > - fix sibling event check by comparing event->pmu with sibling->pmu > - probe PMU for each rootport independently > - use .update() as .read() directly > - remove dynamically generating symbolic name of lane event > - redefine static symbolic name of lane event and leave lane filed to user > - add CPU hotplug support > > 2. addressing comments from Baolin: > - add a mask to avoid possible overflow > > Changes since v2 addressing comments from Baolin: > - remove redundant macro definitions > - use dev_err to print error message > - change pmu_is_register to boolean > - use PLATFORM_DEVID_NONE macro > - fix module author format > > Changes since v1: > > 1. address comments from Jonathan: > - drop marco for PMU name and VSEC version > - simplify code with PCI standard marco > - simplify code with FIELD_PREP()/FIELD_GET() to replace shift marco > - name register filed with single _ instead double > - wrap dwc_pcie_pmu_{write}_dword out and drop meaningless snaity check > - check vendor id while matching vesc with pci_find_vsec_capability() > - remove RP_NUM_MAX and use a list to organize PMU devices for rootports > - replace DWC_PCIE_CREATE_BDF with standard PCI_DEVID > - comments on riping register together > > 2. address comments from Bjorn: > - rename DWC_PCIE_VSEC_ID to DWC_PCIE_VSEC_RAS_DES_ID > - rename cap_pos to ras_des > - simplify declare of device_attribute with DEVICE_ATTR_RO > - simplify code with PCI standard macro and API like pcie_get_width_cap() > - fix some code style problem and typo > - drop meaningless snaity check of container_of > > 3. address comments from Yicong: > - use sysfs_emit() to replace sprintf() > - simplify iteration of pci device with for_each_pci_dev > - pick preferred CPUs on a near die and add comments > - unregister PMU drivers only for failed ones > - log on behalf PMU device and give more hint > - fix some code style problem > > (Thanks for all comments and they are very valuable to me) > > This patchset adds the PCIe Performance Monitoring Unit (PMU) driver support > for T-Head Yitian 710 SoC chip. Yitian 710 is based on the Synopsys PCI Express > Core controller IP which provides statistics feature. > > Shuai Xue (4): > docs: perf: Add description for Synopsys DesignWare PCIe PMU driver > PCI: Add Alibaba Vendor ID to linux/pci_ids.h > drivers/perf: add DesignWare PCIe PMU driver > MAINTAINERS: add maintainers for DesignWare PCIe PMU driver > > .../admin-guide/perf/dwc_pcie_pmu.rst | 97 +++ > Documentation/admin-guide/perf/index.rst | 1 + > MAINTAINERS | 6 + > drivers/infiniband/hw/erdma/erdma_hw.h | 2 - > drivers/perf/Kconfig | 7 + > drivers/perf/Makefile | 1 + > drivers/perf/dwc_pcie_pmu.c | 706 ++++++++++++++++++ > include/linux/pci_ids.h | 2 + > 8 files changed, 820 insertions(+), 2 deletions(-) > create mode 100644 Documentation/admin-guide/perf/dwc_pcie_pmu.rst > create mode 100644 drivers/perf/dwc_pcie_pmu.c > Hi, all, Gently ping. Any comments are welcomed. Thank you. Best Regards, Shuai _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel