From patchwork Tue May 23 13:18:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hejunhao X-Patchwork-Id: 9735 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2140157vqo; Tue, 23 May 2023 06:23:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Kkkcfg6m9ARJ+IAwUuSkL9dO3Vr4/Z4DQFJCyt4a8Jfy4w7fXTTS5lBK1KK0eRYmUJkje X-Received: by 2002:a05:6a20:ce4f:b0:103:377e:439e with SMTP id id15-20020a056a20ce4f00b00103377e439emr11812879pzb.60.1684848239310; Tue, 23 May 2023 06:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684848239; cv=none; d=google.com; s=arc-20160816; b=ke7G7mfn6vr1Tq7kJvpbRBDca245LLlTDTt9t0S09sKmj663tqPIOcHalBITNN7fDu AqIfFJ7g6nzsv3pQUn3d3ErIrZU3Jz5Az50N6DwPeVhiN3ojZW73bnpqtRB4ihQZxLXJ d1cjPDfNi5gAOslgG04MqtCuBod3ANvzRP+nZ2TEMJLjN9tQIDVNuQyCXWDwDQ25aotr vqQOlPb7kmxlB/S1X2kupVj9VRSpfGh1SiopvG91hsJpwmGJnm5LlsLiMl106GlbG558 8Pl9Q81TPG5i3tHFITYnWI63s8R2oGsrK3VuTg5jaQ5R6AI+vZuiq0agUv+t+W8jaSJG LRyw== 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=P8dNmVgXCUJIKrUzQlBFnqF4rFrVB+JYnV5+5Ku4Hvw=; b=In1YyPW3WFbXbRRUMOVmcIsGuvj0MgBf4WirM3srIAu3DzJovc74zG1kdiLK/MVWz5 9ntWAINgYB3gJLKucfcWmHQ5l/Jmhli4rFpN/yUFCll7bLl5fIWKf7J8IiC08YreI5Rm +lfqpkD17NlKIif5qtTDKUf8dUlHuilE1Vm6T06woR5Bz93IF9Aw6O15zBQdi55xdHVH k7hUH8/IBlabK9T7wZI8t405QDxsJMjCUJJ6/HlZTxgRe0ivPF5B/dcTlBWG1kjhur0k n+Gos7U17dFdA3I7h7NiwjbjFl7wo6AskJCohVInuf9IOlyZ+nNcJZ2r1ln03k8wm2i4 6WIA== 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 k13-20020a63ab4d000000b0051e011fcd73si603276pgp.237.2023.05.23.06.23.45; Tue, 23 May 2023 06:23:59 -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 S236570AbjEWNUY (ORCPT + 99 others); Tue, 23 May 2023 09:20:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233330AbjEWNUW (ORCPT ); Tue, 23 May 2023 09:20:22 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5220120; Tue, 23 May 2023 06:20:20 -0700 (PDT) Received: from dggpeml500002.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4QQZZC4CZ8z18LYw; Tue, 23 May 2023 21:15:47 +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; Tue, 23 May 2023 21:20:15 +0800 From: Junhao He To: , , , CC: , , , , , , Subject: [PATCH 0/3] Add support for HiSilicon SoC uncore PMU Date: Tue, 23 May 2023 21:18:22 +0800 Message-ID: <20230523131825.6102-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, RCVD_IN_MSPIKE_H2,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?1766691427469066572?= X-GMAIL-MSGID: =?utf-8?q?1766691427469066572?= 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. 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 | 138 ++++- drivers/perf/hisilicon/hisi_uncore_pmu.c | 5 +- drivers/perf/hisilicon/hisi_uncore_pmu.h | 42 +- drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 581 ++++++++++++++++++++ 6 files changed, 757 insertions(+), 19 deletions(-) create mode 100644 drivers/perf/hisilicon/hisi_uncore_uc_pmu.c