From patchwork Thu Jun 15 12:59:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junhao He X-Patchwork-Id: 13281258 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 508A2EB64DC for ; Thu, 15 Jun 2023 13:02:06 +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=LwyhAOnq9gRTOL3R6qo3pnrl2mxJlutcy9eIKlRwv9M=; b=CgvjeNFv7wMSo9 e/VBNum45jDbRIjvYrqkwvnt3y/XNQNxLSgObyAjvrFAKE3Hab2szBxvo6NyMo649cCTd4vfk9wju NqGrnGbJeiciRI410AFv3xtHxl/e3avqLFgiJPUtJZI7U9dQ4IpJlJtb/l3o/7IaGUlX9J/tg+UcE Q1RLxjzZLWvQKDnV7jH7El7/9gqHIwKbLo8kTs+yAqpX+SuUHQJ3xREj/aWqvWoB7LycmIAA+dPJj GfzxMpHIX/HziOI9twhl6BSEbzBN5j/M9JjtStHcmpVcqFko4fhiA6gyfW2s4UggTXDZxNvKji7IL 4m4jI0d8FqtxzWuuO8CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9mbg-00Ewxl-2Q; Thu, 15 Jun 2023 13:01:44 +0000 Received: from szxga08-in.huawei.com ([45.249.212.255]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9mbd-00Ewvp-2D for linux-arm-kernel@lists.infradead.org; Thu, 15 Jun 2023 13:01:43 +0000 Received: from dggpeml500002.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Qhj3R4qN5z18MJL; Thu, 15 Jun 2023 20:56:35 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggpeml500002.china.huawei.com (7.185.36.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 15 Jun 2023 21:01:33 +0800 From: Junhao He To: , , , CC: , , , , , , Subject: [PATCH v5 0/3] Add support for HiSilicon SoC uncore PMU Date: Thu, 15 Jun 2023 20:59:23 +0800 Message-ID: <20230615125926.29832-1-hejunhao3@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500002.china.huawei.com (7.185.36.158) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230615_060141_953131_F0BAC0D2 X-CRM114-Status: GOOD ( 10.79 ) 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 Add support for HiSilicon UC/H60PA/PAv3 PMU driver. PAv3 PMU: Compared with the PAv2 PMU, the PAv3 PMU has different event. The PAv3 PMU removed some events which are supported by PAv2 PMU. The older PA PMU driver will probe v3 as v2. Add the HISI0275 HID for PAv3 PMU to distinguish different. H60PA PMU: The H60PA PMU and PA are two different devices. The H60PA PMU supports higher bandwidth, and the PA PMU delay is relatively low. Different HIDs are used to distinguish the delay. UC PMU: Each cluster is integrated with a unified cache (UC) PMU, which provides consistency between NUMA and UMA domains. It sits between L2 and the memory system. Change since v4: - Add new HID to distinguish PAv2 and PAv3 according to Mark's suggestion. Link: https://lore.kernel.org/lkml/20230609075608.36559-1-hejunhao3@huawei.com/ Change since v3: - Modify the UC PMU patch commit message according to Jonathan's comment. Link: https://lore.kernel.org/linux-arm-kernel/20230608113719.27433-1-hejunhao3@huawei.com/ Change since v2: - Modify the driver description according to Jonathan's comment. Link: https://lore.kernel.org/linux-arm-kernel/20230531104625.18296-1-hejunhao3@huawei.com/ Change since v1: - Improve according to Yicong's suggestion - Fixes build warning of "-Wmissing-prototypes" Link: https://lore.kernel.org/lkml/20230523131825.6102-1-hejunhao3@huawei.com/ Junhao He (3): drivers/perf: hisi: Add support for HiSilicon H60PA and PAv3 PMU driver drivers/perf: hisi: Add support for HiSilicon UC PMU driver docs: perf: Add new description for HiSilicon UC PMU Documentation/admin-guide/perf/hisi-pmu.rst | 8 + drivers/perf/hisilicon/Makefile | 2 +- drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 127 ++++- drivers/perf/hisilicon/hisi_uncore_pmu.c | 4 +- drivers/perf/hisilicon/hisi_uncore_pmu.h | 14 + drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 578 ++++++++++++++++++++ 6 files changed, 716 insertions(+), 17 deletions(-) create mode 100644 drivers/perf/hisilicon/hisi_uncore_uc_pmu.c