From patchwork Fri Feb 23 10:33:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 13568901 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 00415C54E49 for ; Fri, 23 Feb 2024 10:39:56 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=oOAgUY6v/2wSbgwvKAw1aN8cELu5nanTyUx/Qk3rgHk=; b=Qfch90KOHzWmJp zjCV6gMKebPNBQfjT3eNZj9exY+/bJQaFPuXQy6enUwpEgY7MgApY8Q1GC0j9WyP63ckBvseY0tPR XHAxvylHFga0CJPilQB7y8mjAN81qs5Wc1sogttSuk8Js8VAP5xwhsVTDrzW9098Px6dyrip3/As0 0XHt2ALtKLfb19QURv9x3dLzDRFxE0VDSP00qxJ5P7rmFSLC1RwqiqIYOGlLuWEuzLVoSBH19mI18 ov4PL857r4mI3xmSMmBGF/CKTuBvFGdkxK6IpTnl8q0weja8diZdZngk/BqfP52wQsu1dnGHymt3Z 39I6mginAzX0KWTm8bGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdSxH-00000008yjO-1b0d; Fri, 23 Feb 2024 10:39:09 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdSwq-00000008yc4-2T8Q for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 10:38:43 +0000 Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Th5yb4wYTz1X2qw; Fri, 23 Feb 2024 18:36:07 +0800 (CST) Received: from canpemm500009.china.huawei.com (unknown [7.192.105.203]) by mail.maildlp.com (Postfix) with ESMTPS id A549E1A016B; Fri, 23 Feb 2024 18:38:18 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 23 Feb 2024 18:38:18 +0800 From: Yicong Yang To: , , , , , CC: , , , Subject: [PATCH v2 0/8] drivers/perf: hisi_pcie: Several updates for HiSilicon PCIe PMU driver Date: Fri, 23 Feb 2024 18:33:51 +0800 Message-ID: <20240223103359.18669-1-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500009.china.huawei.com (7.192.105.203) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240223_023833_059671_0D6D02D0 X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Yicong Yang This series mainly fix and optimize the several usage of the driver: - Add more events to complement the TLP bandwidth counting - Fix the wrong counting on using the event group - Properly check the target filter to avoid invalid filter value - Optimize the handling of related events which are not in an event group - Update the docs Change since v1: - Rename hisi_pcie_pmu_{config,clear}_filter() to properly reflect its function. - Add some test case logs to the Patch 5/8 comments. - Avoid use HISI_PCIE_MAX_COUNTER outside of functions in Patch 7/8. Link: https://lore.kernel.org/all/20240204074527.47110-1-yangyicong@huawei.com/ Junhao He (4): drivers/perf: hisi_pcie: Check the target filter properly drivers/perf: hisi_pcie: Relax the check on related events drivers/perf: hisi_pcie: Merge find_related_event() and get_event_idx() docs: perf: Update usage for target filter of hisi-pcie-pmu Yicong Yang (4): drivers/perf: hisi_pcie: Rename hisi_pcie_pmu_{config,clear}_filter() drivers/perf: hisi_pcie: Introduce hisi_pcie_pmu_get_event_ctrl_val() drivers/perf: hisi_pcie: Fix incorrect counting under metric mode drivers/perf: hisi_pcie: Add more events for counting TLP bandwidth .../admin-guide/perf/hisi-pcie-pmu.rst | 31 ++++-- drivers/perf/hisilicon/hisi_pcie_pmu.c | 102 +++++++++--------- 2 files changed, 76 insertions(+), 57 deletions(-)