Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1080996rwd; Thu, 15 Jun 2023 06:12:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45fgULPUjtB3QdE5W1ZOZqLHAkHG/zIJsbIZeG0g+Pbz6lswM/BhGw7NFJXwE8cjtvOnqG X-Received: by 2002:a05:6a00:1903:b0:65d:98a2:8876 with SMTP id y3-20020a056a00190300b0065d98a28876mr5355534pfi.2.1686834726332; Thu, 15 Jun 2023 06:12:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686834726; cv=none; d=google.com; s=arc-20160816; b=JKqy/yA878UoTBtd0M/Gjbd4y4O7xrNBjLtYdJWFVmoqqIypZ7KUXWZ87t3u5HECPk +HQd2hRcw03QBBvnekc2hB7Ff0mZzisMAcsOZhBnJh8t3UsNGJbnuvfXJFBj5uDYik3w Xwypo5HBuKL0FF3HjkGHa0CJV4L/n2GGKHH9Tb0lW7snriModeHqC7N40aUlR0EbtzKl 6OYr5Zn8JUcOYwBBTfT7j/R9EoBMqudeqGezK98Nu5CGWLWTMpMzTC8udKB0P4cY+GwB iJ4SMVVPF094iyN+SDP/a+A/GjjMs8dq5IT82T8OaDhu5HVoSJvxA7MOC1oEY53deyYa U7OQ== 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=31PoQzuwd0q4fBSIn+wjm3qti+K8dvkAejS+0ooyzGU=; b=aM3oPG8rOmUlsFpNN8OiNpQacCVaDwJ4ncpcQ9DHlwSrm2TpAGz1jpAAbiN7MDeKlf EXMmh0kmu/UH9iKafMgds3yOmUgjng8ceavqGEfVEKrF7ECNdvLr96llK6BHyMgVP0+o TvM2MOjCGQlc4rjRn4nNT8md/iQGuUVDK2M1D3DshUOPlOMVljpEyxuBFqsWx08youlf V8XEr5D4mZDwIC1zS0BDfSLRPVCVpKrIJA96CDe1bYFgGCxr+PiYa79ObSCW65fLyIcR lr8CfoN4N5fTLu7sjgSU4t3ajylL3+olahaRikNNirXMGG6Ld8RbK8sCkzairkxl607p UnAg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020a637e07000000b005309f24f940si3693370pgc.586.2023.06.15.06.11.53; Thu, 15 Jun 2023 06:12:06 -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 S238819AbjFONCA (ORCPT + 99 others); Thu, 15 Jun 2023 09:02:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343660AbjFONBi (ORCPT ); Thu, 15 Jun 2023 09:01:38 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12BE4213F; Thu, 15 Jun 2023 06:01:36 -0700 (PDT) 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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-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 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 -- 2.33.0