From patchwork Thu Jun 8 11:37:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hejunhao X-Patchwork-Id: 10481 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp230490vqr; Thu, 8 Jun 2023 05:07:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5i/zAkBKpZjVkSGWWFPi4Idfp+LzMNJW39YGWnMSVIzdkDOXcZHQumXQ2Jo0RxjjnrxN5s X-Received: by 2002:a17:902:bd4b:b0:1af:e63f:5bb1 with SMTP id b11-20020a170902bd4b00b001afe63f5bb1mr4698748plx.7.1686226057905; Thu, 08 Jun 2023 05:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686226057; cv=none; d=google.com; s=arc-20160816; b=uJ4pJ/DsqKKBu3sFaB4sgnvBq3jmCBtu4a5NEnR2sOWEqxhIhGgJDRNyw0Augn7Qry 1rWziX+kMnUABXcQEMF1315Ts9EemTTfxSqBn+i+B+3R2lGAbHpuOAYLiY8O5/XZRwuE Wdow7Qi+R9yRHtCmlsLfzMvzw4OrLDbOgut6VqRzPY5TdaRvLwUymUwelfYo72LP9fl0 ZFjKbnFClX594mjONkWUrbb3d7tBAdovRLkFzTqKKSBeHY7qh46xGR3n00kn0miIdRae 5hLXCnFb0j+SO139qHzYdQ06qbvE1vo5sYPl1mz9VT62bRySmhFrf/GLwz9ShIssxAE+ YlFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=os4z09rI5HDCH7LIpNuY868NWp3fWyC6W8hzkRa3HZE=; b=UziNKdWJZ7ehEUJe1aAh9XEJGvIMZoBBhjUmcoqbzWz/5Idj/tOR7UjbmmtPD29hQg uV8Uzv1C7P7LNrA/Y+10+xknnkBMqTIhz8I07mwCw9V2DoTuuFFw+Z2eSin/y63LXJWZ KzeVTCL4fHM+Fd/e2wL0vd3twwMicNmveXJmvXMEGgHpoMNT0747Nwwpmh/8vIBe7lwM n5zDdJA6A9bnBXFaD3Rv0fV+9k1OdM4xF+timcgXM6A5ULDuTVA5+b/GVlJM8BxaKz1Z ZtE/XbPehMRsYKeDNLhHSU/5AeDtHkK9LzGX6kAiVKQODQ7Ltp53zV3snsb9nG73Pkod 16XA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id li12-20020a170903294c00b001b0489a019asi919647plb.471.2023.06.08.05.07.25; Thu, 08 Jun 2023 05:07:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236257AbjFHLj3 (ORCPT + 99 others); Thu, 8 Jun 2023 07:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233679AbjFHLjZ (ORCPT ); Thu, 8 Jun 2023 07:39:25 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB6481FEB; Thu, 8 Jun 2023 04:39:23 -0700 (PDT) Received: from dggpeml500002.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QcMdY218gz25h5G; Thu, 8 Jun 2023 19:37:37 +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, 8 Jun 2023 19:39:21 +0800 From: Junhao He To: , , , CC: , , , , , , Subject: [PATCH v3 0/3] Add support for HiSilicon SoC uncore PMU Date: Thu, 8 Jun 2023 19:37:16 +0800 Message-ID: <20230608113719.27433-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: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500002.china.huawei.com (7.185.36.158) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768136174720331735?= X-GMAIL-MSGID: =?utf-8?q?1768136174720331735?= Add support for HiSilicon UC/H60PA/PAv3 PMU driver. PAv3 PMU: Compared with the PAv2 PMU, the PAv3 PMU has different event. The version of PMU version register is used to distinguish the v2 and v3. 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 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 | 142 ++++- drivers/perf/hisilicon/hisi_uncore_pmu.c | 4 +- drivers/perf/hisilicon/hisi_uncore_pmu.h | 15 + drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 578 ++++++++++++++++++++ 6 files changed, 732 insertions(+), 17 deletions(-) create mode 100644 drivers/perf/hisilicon/hisi_uncore_uc_pmu.c