Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1693442rdb; Thu, 7 Dec 2023 06:31:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdgXXhr0ny+QtOAbPiZ7Jj2/Ug9cEdV4TZxhO0BXen1FmspHgJtIVR6Z0UrHxThzP5v9+k X-Received: by 2002:a17:90b:19d5:b0:286:dd95:143a with SMTP id nm21-20020a17090b19d500b00286dd95143amr2050050pjb.98.1701959480587; Thu, 07 Dec 2023 06:31:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701959480; cv=none; d=google.com; s=arc-20160816; b=C1hr2aVbbrQSH15EQk/MJQn8QnwkDqSAdj201Whgqxb+T+VhRaI+p50LfJbac0KXnp 0Fu7y1xPIERwD/tsP4Doz2HO6aylHcTfAv020BrfscEJ08lJ6Lyq9o67wYfgjjEwG2fA 00b5fgRoH/m4QoMqdeeuENnvdRHG7eTSZMc+LXl1no4aJGPuYWaMpw0Gt0wh90aZ9l10 VFGRH89DngVrDsbqP9uSzOThPmqes+nbZlnrf3pZtOBAL+a1LrIw1o68aa7a1OvwCZHe YaqtPTMdcQGIhm2oQXXc0nKS+q/Lsz+bL55QqsZvp7l7FztIRxXfsEAqE+iwQFNL0g+w xt7A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=iZHHneR8AyWkEqGP1wSCsTElF3KwuL8QQUAKM8OrLWY=; fh=pNgd1Gv3vj9w93x/4unDWE8U5ZJ3bdiNHxMZXh4o0ns=; b=gf8jZ9ZfOLdny0M5oWVTKM0YVp2BpME3ur5aFefJg7E5nrrrZtF+LsxbBY9l5G1+bT ZJi0wqEPpAszInCrW4W1Jp5441M0FDBQrQw9y02pK3KWuVG8N36q32UbdA2uDS8zC6Ff QuiLQEBU39uaTgkq8npdB+3wvUhrKHlj3yfjd3fAz6FtUl0xQDovUox7KRDeurXMzulW BGFUa8bM83U+Y18DgJ7rNDdZ1d899y8u9BBlBoVcIVpHv9Sxtmha1LMgKLciRKuGtAsh Kn82zYPlma9pChxL8TdQNdEYvqIr/PxacHX0Rt7zCq1b0+zTEszElBHmh/tQIGQfFhOJ iC+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id n14-20020a17090a2bce00b002859d78c5f7si1201353pje.112.2023.12.07.06.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:31:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C6D808032EF1; Thu, 7 Dec 2023 06:31:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443329AbjLGOa6 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 7 Dec 2023 09:30:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443309AbjLGOaz (ORCPT ); Thu, 7 Dec 2023 09:30:55 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CEF610F7; Thu, 7 Dec 2023 06:30:59 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id EE40C24E260; Thu, 7 Dec 2023 22:30:53 +0800 (CST) Received: from EXMBX072.cuchost.com (172.16.6.82) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 7 Dec 2023 22:30:53 +0800 Received: from localhost.localdomain (202.188.176.82) by EXMBX072.cuchost.com (172.16.6.82) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 7 Dec 2023 22:30:47 +0800 From: Ji Sheng Teoh To: Jonathan Corbet , Will Deacon , "Mark Rutland" , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Dan Williams , "Ilkka Koskinen" , Jonathan Cameron , Dave Jiang CC: Ji Sheng Teoh , Ley Foon Tan , , , , Subject: [PATCH v5 3/3] docs: perf: Add description for StarFive's StarLink PMU Date: Thu, 7 Dec 2023 22:29:40 +0800 Message-ID: <20231207142940.1794032-4-jisheng.teoh@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231207142940.1794032-1-jisheng.teoh@starfivetech.com> References: <20231207142940.1794032-1-jisheng.teoh@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.188.176.82] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX072.cuchost.com (172.16.6.82) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:31:17 -0800 (PST) StarFive StarLink PMU support monitoring L3 memory system PMU events. Add documentation to describe StarFive StarLink PMU support and it's usage. Signed-off-by: Ji Sheng Teoh --- Documentation/admin-guide/perf/index.rst | 1 + .../perf/starfive_starlink_pmu.rst | 46 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 Documentation/admin-guide/perf/starfive_starlink_pmu.rst diff --git a/Documentation/admin-guide/perf/index.rst b/Documentation/admin-guide/perf/index.rst index a2e6f2c81146..c5de7579a71b 100644 --- a/Documentation/admin-guide/perf/index.rst +++ b/Documentation/admin-guide/perf/index.rst @@ -13,6 +13,7 @@ Performance monitor support imx-ddr qcom_l2_pmu qcom_l3_pmu + starfive_starlink_pmu arm-ccn arm-cmn xgene-pmu diff --git a/Documentation/admin-guide/perf/starfive_starlink_pmu.rst b/Documentation/admin-guide/perf/starfive_starlink_pmu.rst new file mode 100644 index 000000000000..2932ddb4eb76 --- /dev/null +++ b/Documentation/admin-guide/perf/starfive_starlink_pmu.rst @@ -0,0 +1,46 @@ +================================================ +StarFive StarLink Performance Monitor Unit (PMU) +================================================ + +StarFive StarLink Performance Monitor Unit (PMU) exists within the +StarLink Coherent Network on Chip (CNoC) that connects multiple CPU +clusters with an L3 memory system. + +The uncore PMU supports overflow interrupt, up to 16 programmable 64bit +event counters, and an independent 64bit cycle counter. +The PMU can only be accessed via Memory Mapped I/O and are common to the +cores connected to the same PMU. + +Driver exposes supported PMU events in sysfs "events" directory under:: + + /sys/bus/event_source/devices/starfive_starlink_pmu/events/ + +Driver exposes cpu used to handle PMU events in sysfs "cpumask" directory +under:: + + /sys/bus/event_source/devices/starfive_starlink_pmu/cpumask/ + +Driver describes the format of config (event ID) in sysfs "format" directory +under:: + + /sys/bus/event_source/devices/starfive_starlink_pmu/format/ + +Example of perf usage:: + + $ perf list + + starfive_starlink_pmu/cycles/ [Kernel PMU event] + starfive_starlink_pmu/read_hit/ [Kernel PMU event] + starfive_starlink_pmu/read_miss/ [Kernel PMU event] + starfive_starlink_pmu/read_request/ [Kernel PMU event] + starfive_starlink_pmu/release_request/ [Kernel PMU event] + starfive_starlink_pmu/write_hit/ [Kernel PMU event] + starfive_starlink_pmu/write_miss/ [Kernel PMU event] + starfive_starlink_pmu/write_request/ [Kernel PMU event] + starfive_starlink_pmu/writeback/ [Kernel PMU event] + + + $ perf stat -a -e /starfive_starlink_pmu/cycles/ sleep 1 + +Sampling is not supported. As a result, "perf record" is not supported. +Attaching to a task is not supported, only system-wide counting is supported. -- 2.25.1