From patchwork Thu Apr 15 12:48:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "liuqi (BA)" X-Patchwork-Id: 12205353 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=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 B8632C43461 for ; Thu, 15 Apr 2021 12:50:17 +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 6C33E613C3 for ; Thu, 15 Apr 2021 12:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C33E613C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.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: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=KKD1qWyBfOncMO/1CdjXleTvkfrlJy1NDJsAaxxxMZ0=; b=paKncOMJIk1qMDOQfAgjnULKdn yvm0QIMR6bAST48la1b6pEq7RGPlvENTqWGu2FvFmOW+s0CTsKT5E/WndlFgXpXVJlAxb2X9o2lQv +LE9+5ZHWMyQSTIP8VWkd3jgpkCsI1UyLcNTXtqJnLUD4qLb+AJnnTVVwGTOxVT3Kk2IThgcVZYX5 GNTp81t9BPM0fL3NsZpRiWvfp+K+HedazVHU0k0/Uqz6OVthffN3La8Bg0PlEbSMB+EYfImcyn7wq QbPutKL3ZIGiKJClFccH7tscsTBsGBl96zrlsKtIrWN/nL9HEbxvC6ozzCjRLiWcH09hwkhd+YRpU h1tbxwaA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lX1Pw-00G9rB-RE; Thu, 15 Apr 2021 12:48:21 +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 1lX1Pr-00G9qR-Oa for linux-arm-kernel@desiato.infradead.org; Thu, 15 Apr 2021 12:48:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:Message-ID: Date:Subject:CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=hFS7lFG4FjGRSYWNQjJyoKZC+G7giDQiqEtw4tGHShk=; b=1BcnDDKpbIZeqgS8k8idPlEFj9 QKe+FwhXzUuu/QtcuflNntishloZCz96e4cZyhftuZZ5e5+aZYWshfECkimgWz6AhbwhqMG52teSz Lxl04ylEvB14iks6YR2q/p2rh08WfE4HOEVAh4jZLyW9g4WxJBvcGI22ujmyt+skRDlJ97w2n8Gf9 MwozsabCW/t6Y6AUpEud879yNIFQfz8RzIkPYbvT4S6Z5gZHsV/GDLWsMy9tgoPKvVt8pSD0w1ohh kALC27oXzLWZYLdhpqYZTz82rPrwce64Ee5u4QUpEvo4emVGl7g0OpqrNo7GOVEYPSICPDsenBauP 4qUzqg0w==; Received: from szxga04-in.huawei.com ([45.249.212.190]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX1Po-008Zl3-NN for linux-arm-kernel@lists.infradead.org; Thu, 15 Apr 2021 12:48:14 +0000 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FLfFF6z49zpYZF; Thu, 15 Apr 2021 20:45:05 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Thu, 15 Apr 2021 20:47:49 +0800 From: Qi Liu To: , , CC: , , , , Subject: [PATCH v3 0/2] drivers/perf: hisi: Add support for PCIe PMU Date: Thu, 15 Apr 2021 20:48:03 +0800 Message-ID: <1618490885-44612-1-git-send-email-liuqi115@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_054812_952433_4845CEC4 X-CRM114-Status: GOOD ( 10.03 ) 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 This patchset adds support for HiSilicon PCIe Performance Monitoring Unit(PMU). It is a PCIe Root Complex integrated End Point(RCiEP) device added on Hip09. Each PCIe Core has a PMU RCiEP to monitor multi root ports and all Endpoints downstream these root ports. HiSilicon PCIe PMU is supported to collect performance data of PCIe bus, such as: bandwidth, latency etc. This patchset is based on 5.12-rc6. Changes since v2: - Address the comments from John. - Link: https://lore.kernel.org/linux-arm-kernel/1617959157-22956-1-git-send-email-liuqi115@huawei.com/ Changes since v1: - Drop the internal Reviewed-by tag. - Fix some build warnings when W=1. - Link: https://lore.kernel.org/linux-arm-kernel/1617788943-52722-1-git-send-email-liuqi115@huawei.com/ Qi Liu (2): docs: perf: Add description for HiSilicon PCIe PMU driver drivers/perf: hisi: Add driver for HiSilicon PCIe PMU Documentation/admin-guide/perf/hisi-pcie-pmu.rst | 104 +++ MAINTAINERS | 6 + drivers/perf/Kconfig | 2 + drivers/perf/Makefile | 1 + drivers/perf/pci/Kconfig | 16 + drivers/perf/pci/Makefile | 2 + drivers/perf/pci/hisilicon/Makefile | 3 + drivers/perf/pci/hisilicon/hisi_pcie_pmu.c | 1014 ++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 9 files changed, 1149 insertions(+) create mode 100644 Documentation/admin-guide/perf/hisi-pcie-pmu.rst create mode 100644 drivers/perf/pci/Kconfig create mode 100644 drivers/perf/pci/Makefile create mode 100644 drivers/perf/pci/hisilicon/Makefile create mode 100644 drivers/perf/pci/hisilicon/hisi_pcie_pmu.c