From patchwork Fri Jun 9 07:56:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hejunhao X-Patchwork-Id: 10520 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp784924vqr; Fri, 9 Jun 2023 01:05:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5QVuqkbfnDQ9f81jTMNHLsKn2r4qbEERP8whvqYzsjZzygWLuXzvPFYQwFEs6ZLBfCgTH7 X-Received: by 2002:a05:6358:11:b0:129:c642:a1cc with SMTP id 17-20020a056358001100b00129c642a1ccmr294294rww.30.1686297954371; Fri, 09 Jun 2023 01:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686297954; cv=none; d=google.com; s=arc-20160816; b=QAcOEiaoQofVv7dYoh0f8zIAESnbeln43UrGf88qeyZ+K8qAQ9rvgwjn0Aw9ty1Y0N 9HqAeO7S/PEvuVgzmdzwlwKE4pc5jS6um+YJVaXxzqBNeJZG0QM6G9h7MxOIlWpi4w/3 V10O19+rDKQd9kcR/NCCimIZ0PUItHQHbx6KyGs2QLULVI+zjLFto5oA1u1+sv0Mlm0W tiDPaT7IszirakKOnGnvZp6QrxEW1z9cKa9ZMLkQSnc8h4+MqjrIA6zhxs52j+We1Amf pwJpEDh3R8kbuqr2ZkbVPKsGrXqVXLFw0EqiNrIizC8miecoRwTgss4WenHAjPWhKmPq HOVA== 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=2B1kAZRs2NLs1bmwlqO/25ogzcOOpUfnQ80UIF4LbZY=; b=DbUBY9YO6insg3lZ3q1CeKS9sZkCZLf301Ka2AaJtzZpIgVlEsGWNhBk2uc1fDuDkI uMO5tKxnFtQyjhY2yi5TvOgCcmT2WH0cPfyHjqjC/mWX4+YZtdhfa4ssORiQCH8pDVCC 1SSoQIAvaYIFjyc7xNJgLrSe34IUgduaZndIaDP2xkVmVNoKOGvcLXdmwXnEL0xmr6bY R0a5WQSMq9aE65Xc7u3pXFRT5cs0Xct/W6hapikohr5obav/RSArtnkN2EhNiFcpkIub vxevdC67swZDLuRb4UmIolh5x7LoBn1EaCMis7LVQE7bo6/Qk/b9cR1EsyEyqKTv1TKM rQUw== 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 m75-20020a633f4e000000b0053482b814b0si2233073pga.296.2023.06.09.01.05.39; Fri, 09 Jun 2023 01:05:54 -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 S239953AbjFIIBN (ORCPT + 99 others); Fri, 9 Jun 2023 04:01:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239708AbjFIIAf (ORCPT ); Fri, 9 Jun 2023 04:00:35 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A872D2D7F; Fri, 9 Jun 2023 00:58:53 -0700 (PDT) Received: from dggpeml500002.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QctfN3RP9zLqTp; Fri, 9 Jun 2023 15:55:08 +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; Fri, 9 Jun 2023 15:58:11 +0800 From: Junhao He To: , , , CC: , , , , , , Subject: [PATCH v4 0/3] Add support for HiSilicon SoC uncore PMU Date: Fri, 9 Jun 2023 15:56:05 +0800 Message-ID: <20230609075608.36559-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: dggems706-chm.china.huawei.com (10.3.19.183) 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?1768211564123233395?= X-GMAIL-MSGID: =?utf-8?q?1768211564123233395?= 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 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 | 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