From patchwork Thu Oct 31 14:21:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Besar Wicaksono X-Patchwork-Id: 2004689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=Z89XF8yL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-tegra+bounces-4073-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XfR5J5JMVz1xwc for ; Fri, 1 Nov 2024 01:21:56 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6120B1F21B7E for ; Thu, 31 Oct 2024 14:21:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDD2E1A0B04; Thu, 31 Oct 2024 14:21:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Z89XF8yL" X-Original-To: linux-tegra@vger.kernel.org Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2073.outbound.protection.outlook.com [40.107.223.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C1321A08AB; Thu, 31 Oct 2024 14:21:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.73 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730384512; cv=fail; b=qyTUK48n4Ym5KgAHdv4gOZFWIQeAjhy+Z+qk1udsVVQeN4x5HmXL89VOqvbJst2tLqYQRsosn6lynx+jo2Tbp8eS0IlWnSYtBm1D9Qd7kUOrd/jkp9Es1Ai8fH+pSLCLyBRJLqqlG7+tBIi9Yn74i2rYyW2vYu1kVbswhI4cc3E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730384512; c=relaxed/simple; bh=Py6pcVJhAWkxWSmec0WpF7L/lfP/d2xbImYOiJOC2d4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b5zVWEccj2KKkPgHD6YHm0+qGFgIsg07DTjObquhe891Swuc4NaKhf2AOzVf4EKuQ079X06bpIm46dkwddAUe+EDaWD+e+6snBoIhvv375kuz8tIIMr5Jid/fIYyj743d0ZsMMtSTSXyGrJXCvfzlQHCrNW0DnQYDRovgiZ9gUY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=Z89XF8yL; arc=fail smtp.client-ip=40.107.223.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Jj60317OX4337Prp8aN7Zrh9chJNO/VTH0jXyBISaETXhEY+/iPtxXGO56MXItMuD+82c/Hk6DhjeNbXRtv4Y6U9oiR5kwm73Tdxt1Vt4ZimCDifGPezoLaQm3BYlgAEYvtjhnRU5R4m2oKkV3zQj91qUWY6sFL531lCKl0Fg4PdERqGlIpxReH0UNz3NMLxulxDILcKm2L28FXTcVCloMdVWGvciQjKBnkDhOBRgP9PzPvouwMJa5tfpVPwyfdQQSDF3MUq527UiTs7CBSPKQvpsgswjFYKwDYC8FT+vaQUO1PccUP3Hxo8vK3rDJ4vnjbsEvjVsZVQyvufWZQZWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ng+uljFMhiGVWsZsaFsSzr10iI6+EPhC4xcLIRcvj70=; b=fPF3aE6ls48YQd4z+7lOegBXe1JUQiX6jdOfR9EQP0g4wkE1BKiKbJ+39d9I1vz+miYytCA/cYVZshTEVyV5GvudPfnz5T2BA8wr4aL0xjn4CUQ3GOF8HHTRsPJb8+f1xkSCxrf2qwiVqAxUpnMuDUGjI1fV5w59VSZTHvWWMTbVEVgp3fElnNpFFuCpN6snfKZdirs+SPf22QHUtxxjChzySNO5SaZLrrTb4fEv/iJWlBtH1nvxh/6PQ4CLObVlNLkOcickqqRbD2CJT2F6IuqOQBz+sitIKECKQVFWZqytBs3TofquXzc/gM7sigm8NDk5kMr2fpbmLql/NJc3tw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ng+uljFMhiGVWsZsaFsSzr10iI6+EPhC4xcLIRcvj70=; b=Z89XF8yL2AHgGKHZY2ZLdNxjVWGu5JAhGU4qPdo8cw1GSXgGpabFSFFOd8HndS9g7aKon/F8yjcXCiSN3wR0jZNggLSDBAtzlpm/m40rCsTufpcUqe4k3LtE/TEAjdhl9g4JgmG9YL0KUqBwYO3RwqIvCsoiJqKedPkABqFOZu83IAgwozzc5NOCFvApqzTFM+4ftwgKZdMTcjJTbc8WBlXJ9d20X6V+sbARil3vbyvIRHUtEmpir+knSDhEfTbayf6OfDWFkrW4wE+lgFtrUaxRSIeFJoALd1GzKJ24nRx+bM5lPDgthOqHLoHvRf7qFu674SdQ/DOzS0lllMP0Pg== Received: from CH2PR07CA0058.namprd07.prod.outlook.com (2603:10b6:610:5b::32) by CH2PR12MB9460.namprd12.prod.outlook.com (2603:10b6:610:27f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Thu, 31 Oct 2024 14:21:45 +0000 Received: from CH2PEPF00000141.namprd02.prod.outlook.com (2603:10b6:610:5b:cafe::b0) by CH2PR07CA0058.outlook.office365.com (2603:10b6:610:5b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20 via Frontend Transport; Thu, 31 Oct 2024 14:21:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH2PEPF00000141.mail.protection.outlook.com (10.167.244.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.16 via Frontend Transport; Thu, 31 Oct 2024 14:21:44 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 31 Oct 2024 07:21:30 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 31 Oct 2024 07:21:30 -0700 Received: from build-bwicaksono-20240327T112120892.internal (10.127.8.12) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 31 Oct 2024 07:21:29 -0700 From: Besar Wicaksono To: , , , , CC: , , , , , , , , , Besar Wicaksono Subject: [PATCH v2 1/4] perf: arm_cspmu: nvidia: remove unsupported SCF events Date: Thu, 31 Oct 2024 14:21:15 +0000 Message-ID: <20241031142118.1865965-2-bwicaksono@nvidia.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241031142118.1865965-1-bwicaksono@nvidia.com> References: <20241031142118.1865965-1-bwicaksono@nvidia.com> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF00000141:EE_|CH2PR12MB9460:EE_ X-MS-Office365-Filtering-Correlation-Id: d90ab3f3-90fd-4f5e-0bea-08dcf9b75940 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: MiIA2o0f2AGz9E6WSFOfR3iq0Xatsuz5Bxe6TgEMB2iuVJbdxCUqn2u6zu02EvOC3RdvoRpVNYoOjMxEfqJe7gtaCSN12MSdu7DD2SxacsnnvXBz//sQ7n21+1xceM7JGLpr+QAmwwlMbmj3CLbD+tKiC5jLpNDH/dX00pKcWZEERHZWtwU+JEY44NwRzHBYdR84tMRtf9RgYK3LYPE4v8e2vUzgdDHuiFJTa+07hnmYZ3uetZxAY49Q2OHW88y9aXXvlmW5XEUEG5CScGjA1xkMWNeHoZBTGxpkRbLsY/5ptytuw4cdGNl5iOfsl7SJGcIxkbtQTFGtxEqroCBc5GArS1fKeSFqcbwM18vCpju7FZ+B8WX8jEJtwYjPBWMIIXHabg1UzUQoHb06Q848VnHJ/0dUGHWKfETYwfQtA9ac2yQDYaUAGpC+++KU1v/XYZmUHpAeYn5MMikjuEgF39igNOjivdtuOKbAyfpYH/V9OpvttCBQ+kAB2R/1jcGKC/zv8AyjWaGUjU7j7nliEVk2QcJUugGn6yQx/B1S0IC9gBOksWwKnsi50tZlfXZa08uOUIw1nfkOKhpWF316e23B/+84A43lWsAIGTdpra0TqkITJk+zfuZU1mK7z95XXdzJ352KX0Ptji4kGGqXicZF9iTcs4/DpNd2eXAWCd4WAPt8CfFauzOU4HQkqrH9O7TR5qynaMvNyrUHIa1EwV4a7pxdPQyRIS6JKtRtm1RhXCa90KLWbfID6cw1ynF75fM2DeWh8+K4127wwbXYNWWusMTWWXfyYuD+20Z+UVtTEElAqSdaFC7yuUVGRdE1ATh2D4V827ACtX9jACYjv6cF2Yw/A00mGavn4d12SxkwYgPxM3gpR59+PZHNtQfyEm6QkyNMwFrp4E+9QUOgkNd11+f9NIZfmRxFbu1hrDyr00cFBncf+7DNEdffpMwBvS6ptSDyrXnvBPScYuPhnPjZlGuDPVuM2YcsXJbyBxg2IPUomjKcfzIGZs6JsZ5nNqDnAvwUreQf42kapg3iCtQo9A8MuODge7PuAsA/AO6Y2G4OtfOFPrtBwNPLJB4WEnlgSxpFD7Q1LOQs6dIsTPXrH+rKT46uXP2OnBfJ9L16XxPepSuxZVbRukpyACcev/XWQAyxatu99jL6SCvnoS/V+vcwKI5k7KVWt2TIQ92CsoIqBD/1P4K37Cs5GvQjlhDD57OELrM2kwDpmm8SH4pA6NGf3E0hpHupqvI9idIMCnx1R0LwHK8ITFsYIMBVJnzUwD9Ob31JO3hw2smw9nqzFHpVjcneXA/qAB197J4SDyOUFV+FhsJKoVezSv7aoeWKaECRSUfAz3fg8F3jjI/yvo1egqE6o/HEBLJWBxeh7mrPduAYqfhgGL4/P6k0JgEq6WZkgL36+IySBx1XEg== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 14:21:44.9750 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d90ab3f3-90fd-4f5e-0bea-08dcf9b75940 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF00000141.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB9460 Remove unsupported events under SCF PMU. Signed-off-by: Besar Wicaksono --- drivers/perf/arm_cspmu/nvidia_cspmu.c | 64 --------------------------- 1 file changed, 64 deletions(-) diff --git a/drivers/perf/arm_cspmu/nvidia_cspmu.c b/drivers/perf/arm_cspmu/nvidia_cspmu.c index d0ef611240aa..ea2d44adfa7c 100644 --- a/drivers/perf/arm_cspmu/nvidia_cspmu.c +++ b/drivers/perf/arm_cspmu/nvidia_cspmu.c @@ -54,65 +54,24 @@ static struct attribute *scf_pmu_event_attrs[] = { ARM_CSPMU_EVENT_ATTR(scf_cache_wb, 0xF3), NV_CSPMU_EVENT_ATTR_4(socket, rd_data, 0x101), - NV_CSPMU_EVENT_ATTR_4(socket, dl_rsp, 0x105), NV_CSPMU_EVENT_ATTR_4(socket, wb_data, 0x109), - NV_CSPMU_EVENT_ATTR_4(socket, ev_rsp, 0x10d), - NV_CSPMU_EVENT_ATTR_4(socket, prb_data, 0x111), NV_CSPMU_EVENT_ATTR_4(socket, rd_outstanding, 0x115), - NV_CSPMU_EVENT_ATTR_4(socket, dl_outstanding, 0x119), - NV_CSPMU_EVENT_ATTR_4(socket, wb_outstanding, 0x11d), - NV_CSPMU_EVENT_ATTR_4(socket, wr_outstanding, 0x121), - NV_CSPMU_EVENT_ATTR_4(socket, ev_outstanding, 0x125), - NV_CSPMU_EVENT_ATTR_4(socket, prb_outstanding, 0x129), NV_CSPMU_EVENT_ATTR_4(socket, rd_access, 0x12d), - NV_CSPMU_EVENT_ATTR_4(socket, dl_access, 0x131), NV_CSPMU_EVENT_ATTR_4(socket, wb_access, 0x135), NV_CSPMU_EVENT_ATTR_4(socket, wr_access, 0x139), - NV_CSPMU_EVENT_ATTR_4(socket, ev_access, 0x13d), - NV_CSPMU_EVENT_ATTR_4(socket, prb_access, 0x141), - - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_rd_data, 0x145), - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_rd_access, 0x149), - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_wb_access, 0x14d), - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_rd_outstanding, 0x151), - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_wr_outstanding, 0x155), - - NV_CSPMU_EVENT_ATTR_4(ocu, rem_rd_data, 0x159), - NV_CSPMU_EVENT_ATTR_4(ocu, rem_rd_access, 0x15d), - NV_CSPMU_EVENT_ATTR_4(ocu, rem_wb_access, 0x161), - NV_CSPMU_EVENT_ATTR_4(ocu, rem_rd_outstanding, 0x165), - NV_CSPMU_EVENT_ATTR_4(ocu, rem_wr_outstanding, 0x169), ARM_CSPMU_EVENT_ATTR(gmem_rd_data, 0x16d), ARM_CSPMU_EVENT_ATTR(gmem_rd_access, 0x16e), ARM_CSPMU_EVENT_ATTR(gmem_rd_outstanding, 0x16f), - ARM_CSPMU_EVENT_ATTR(gmem_dl_rsp, 0x170), - ARM_CSPMU_EVENT_ATTR(gmem_dl_access, 0x171), - ARM_CSPMU_EVENT_ATTR(gmem_dl_outstanding, 0x172), ARM_CSPMU_EVENT_ATTR(gmem_wb_data, 0x173), ARM_CSPMU_EVENT_ATTR(gmem_wb_access, 0x174), - ARM_CSPMU_EVENT_ATTR(gmem_wb_outstanding, 0x175), - ARM_CSPMU_EVENT_ATTR(gmem_ev_rsp, 0x176), - ARM_CSPMU_EVENT_ATTR(gmem_ev_access, 0x177), - ARM_CSPMU_EVENT_ATTR(gmem_ev_outstanding, 0x178), ARM_CSPMU_EVENT_ATTR(gmem_wr_data, 0x179), - ARM_CSPMU_EVENT_ATTR(gmem_wr_outstanding, 0x17a), ARM_CSPMU_EVENT_ATTR(gmem_wr_access, 0x17b), NV_CSPMU_EVENT_ATTR_4(socket, wr_data, 0x17c), - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_wr_data, 0x180), - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_wb_data, 0x184), - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_wr_access, 0x188), - NV_CSPMU_EVENT_ATTR_4(ocu, gmem_wb_outstanding, 0x18c), - - NV_CSPMU_EVENT_ATTR_4(ocu, rem_wr_data, 0x190), - NV_CSPMU_EVENT_ATTR_4(ocu, rem_wb_data, 0x194), - NV_CSPMU_EVENT_ATTR_4(ocu, rem_wr_access, 0x198), - NV_CSPMU_EVENT_ATTR_4(ocu, rem_wb_outstanding, 0x19c), - ARM_CSPMU_EVENT_ATTR(gmem_wr_total_bytes, 0x1a0), ARM_CSPMU_EVENT_ATTR(remote_socket_wr_total_bytes, 0x1a1), ARM_CSPMU_EVENT_ATTR(remote_socket_rd_data, 0x1a2), @@ -122,35 +81,12 @@ static struct attribute *scf_pmu_event_attrs[] = { ARM_CSPMU_EVENT_ATTR(cmem_rd_data, 0x1a5), ARM_CSPMU_EVENT_ATTR(cmem_rd_access, 0x1a6), ARM_CSPMU_EVENT_ATTR(cmem_rd_outstanding, 0x1a7), - ARM_CSPMU_EVENT_ATTR(cmem_dl_rsp, 0x1a8), - ARM_CSPMU_EVENT_ATTR(cmem_dl_access, 0x1a9), - ARM_CSPMU_EVENT_ATTR(cmem_dl_outstanding, 0x1aa), ARM_CSPMU_EVENT_ATTR(cmem_wb_data, 0x1ab), ARM_CSPMU_EVENT_ATTR(cmem_wb_access, 0x1ac), - ARM_CSPMU_EVENT_ATTR(cmem_wb_outstanding, 0x1ad), - ARM_CSPMU_EVENT_ATTR(cmem_ev_rsp, 0x1ae), - ARM_CSPMU_EVENT_ATTR(cmem_ev_access, 0x1af), - ARM_CSPMU_EVENT_ATTR(cmem_ev_outstanding, 0x1b0), ARM_CSPMU_EVENT_ATTR(cmem_wr_data, 0x1b1), - ARM_CSPMU_EVENT_ATTR(cmem_wr_outstanding, 0x1b2), - - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_rd_data, 0x1b3), - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_rd_access, 0x1b7), - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_wb_access, 0x1bb), - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_rd_outstanding, 0x1bf), - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_wr_outstanding, 0x1c3), - - ARM_CSPMU_EVENT_ATTR(ocu_prb_access, 0x1c7), - ARM_CSPMU_EVENT_ATTR(ocu_prb_data, 0x1c8), - ARM_CSPMU_EVENT_ATTR(ocu_prb_outstanding, 0x1c9), ARM_CSPMU_EVENT_ATTR(cmem_wr_access, 0x1ca), - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_wr_access, 0x1cb), - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_wb_data, 0x1cf), - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_wr_data, 0x1d3), - NV_CSPMU_EVENT_ATTR_4(ocu, cmem_wb_outstanding, 0x1d7), - ARM_CSPMU_EVENT_ATTR(cmem_wr_total_bytes, 0x1db), ARM_CSPMU_EVENT_ATTR(cycles, ARM_CSPMU_EVT_CYCLES_DEFAULT), From patchwork Thu Oct 31 14:21:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Besar Wicaksono X-Patchwork-Id: 2004691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=LpRCCPo0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-tegra+bounces-4075-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XfR5V1m9Wz1xwc for ; Fri, 1 Nov 2024 01:22:06 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C7A55281737 for ; Thu, 31 Oct 2024 14:22:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 795CB1A0BFF; Thu, 31 Oct 2024 14:22:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="LpRCCPo0" X-Original-To: linux-tegra@vger.kernel.org Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2069.outbound.protection.outlook.com [40.107.100.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12ADB1A08B2; Thu, 31 Oct 2024 14:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.69 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730384524; cv=fail; b=RDDQMs+ScIMkWqyOK0NrqQl7jE9Xeh1LykWFQQpz937zgcB2aj5kDl+KCao7cdk8E9TpQpqf25QSGvZsk/4sqkn/7gLiT3i3LtiW95G1MDbcQIQ2agt6kUm103sIIurQIrg/VUPROKzHB3DU3JnAoZKPmrKUbEYkmrSrlk+KE7I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730384524; c=relaxed/simple; bh=lG1iozlCMjw6ihZ9Lci8dnA1Hhw2lWr6hJL4/h6U9vs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GgErbFvPqM5zAy0JCmLqoJBuegUixcJzr2Bbz5wwcXUlj5BJeYwVNZUT7Vj7v8L1ON/nizUly6xm7DAaAtzjjUFUzN/vkNkd1yqJnDfrpwlLljKER0n/9mtfGzCoH9O8pY9ihuzGnMnp9dXVo2Ex+CeJfE6VIYbWaDPv8T+QCt4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=LpRCCPo0; arc=fail smtp.client-ip=40.107.100.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SrIzlRVjX3keaQ/zSs8c4lKagcDhNqd0hH+NhLPkpiWJ5uzNumRdCvKKeApITotJO1MeXeBRCdxtH2c3cel99ZCLV4LwsJr/MIyTwv4zFNZap7DeQsgPGcMJstJ+kd4V2XDDKnj4FzGRnQedYJJrV52cgd0j+Vapug/u8GQSrvIe2514iPqU08509RRyrkl9Ia46+70effz5LCbJanj1b7pXW3vHXEfsvWwlOd3hRvQEWIUzMTzYh1dhPuEXfmSfk9sEr3fthdD56y+CzZ0vp0hACLC0aBhxBdO21imjolAYzXiVf7GPuPJaOVo4LvJ6N8ufHjmQfYeVfk1YfL3Gkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aZLGvHB4l24ViWSJz016Sysgpd1lLATV6dUroaywx2g=; b=m5fJ0LS20efKuGswGYf52HzYaPbEQsUtsiqJUUTOqCh6lcWTQJ3tVj1spu5xJnzwaJQMDL5lb6M7np09gQmZtGUVz3iI3MnMiNfOGnCs3dR6E7y5E4ztvcbdndEsfco57iMhDAemu4L0JcQ/7ur/MPeuYPzhEdSNZ3cutwzO5N88FPuC7vvSh6rLJwbownkhYyTdsgskRUhc8mYTsbyT9SdK9S0YAXk99CpZIzBVhjFPQq0Uz4X3OgAH/gxFoi/eNOuKsCfLrcRQZ7asauO+ZNyneFYhLV45Bn3YJj/joSFNhCjsiuanYAjV9xYCHSdKSzyArxmXYRXWS0LIIjefjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aZLGvHB4l24ViWSJz016Sysgpd1lLATV6dUroaywx2g=; b=LpRCCPo035RFCGhjdrWa6/CECZQwlu+wiXqG1oYCOKEu/HJ3yrGDIVYyfP4gQ03bujf7lRaCAhZFfypqku81ypk8r8AC5XQ2TzUWMYxP/9odhkMIwnCG0S1n8uci3WstDRDif1bcexuhTgb7IuapotJwNpLCA0qosMMPg2d7IMgVvzyyG7nz4+842lawwKbxngrfWfpw7Q2QsXbdB0MWXNHAalNwlzoACF1Vat5LK0pLu+dWdsTs/NocQOutAMGKiYWeblm+a377xVLKIXmU8f+Hs1ue5NIJR/qK4rPCkh8Y4FHM07hRVsfWe2VR9GUep5TB2bkBZ2mGWNBJyCT61Q== Received: from MW4PR04CA0375.namprd04.prod.outlook.com (2603:10b6:303:81::20) by CY5PR12MB6276.namprd12.prod.outlook.com (2603:10b6:930:f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Thu, 31 Oct 2024 14:21:58 +0000 Received: from CH2PEPF0000013F.namprd02.prod.outlook.com (2603:10b6:303:81:cafe::28) by MW4PR04CA0375.outlook.office365.com (2603:10b6:303:81::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.23 via Frontend Transport; Thu, 31 Oct 2024 14:21:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH2PEPF0000013F.mail.protection.outlook.com (10.167.244.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.16 via Frontend Transport; Thu, 31 Oct 2024 14:21:58 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 31 Oct 2024 07:21:35 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 31 Oct 2024 07:21:35 -0700 Received: from build-bwicaksono-20240327T112120892.internal (10.127.8.12) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 31 Oct 2024 07:21:34 -0700 From: Besar Wicaksono To: , , , , CC: , , , , , , , , , Besar Wicaksono Subject: [PATCH v2 2/4] perf: arm_cspmu: nvidia: fix sysfs path in the kernel doc Date: Thu, 31 Oct 2024 14:21:16 +0000 Message-ID: <20241031142118.1865965-3-bwicaksono@nvidia.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241031142118.1865965-1-bwicaksono@nvidia.com> References: <20241031142118.1865965-1-bwicaksono@nvidia.com> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000013F:EE_|CY5PR12MB6276:EE_ X-MS-Office365-Filtering-Correlation-Id: 8fc40070-4bec-4459-1902-08dcf9b76109 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: KG3qXw0CXYvb4H+Fb3y1fU19ua/F3CnsX7eVcZwH1YB6BkIK0eVmF2CnzRoGYDMuYGeOM8vrYZJ0gJoQtUcuul7D62JSfQmbGSqRFwtD6SunZIQhEzdG1tsx8ARH+YwqTzUMhHMzp06Mv77D40gkF2yV/FfR1VUIdpJ6o1rNZPv5tYzAl5oG9SVhqU0ZtFCHLeEwpLdOH/bqrSXCR9Xk7zlTSli9sS1Hjw8whq3Z6p1JgxHMvyq/h+F/aTUb6X2zpIEDpaQfBYeKF5My4y8uQkA6vWCEdj7e2OefrhkabIA7N2ewl+rGc4qZj9PwiOMxAgqo6sm/7LKKAUEiLNmBtBH1E88maVrWy+5/QUwJCaVFE+rHD6xPuZGxFxW5/BY7XRq8nWBsJEMrw+Zk4Eayuagb0XmJ90NfA1MahDR0jpTDmIje0VjO/snntdDk+ke8+4fGrkZb3k4yWOO5XFAUl8Fsma4dryNttoWZPJYF/kPEnIc3PVt5p4I4xkm1LabX+7OWjsWLz7NSNY5wtpuKvmabIVtTVqpQiwp8JQ1V/mIR3TmtmZYd7mXtlvPWt0xRJeUjggHT1FKtIu63EFvOe5PBdL6BsdFqo4L/mbltdMVvqrX3z3RJMiX23m8ekjxcDJFJoRdwb0j9clPPfkpASUdFSCqEFuJzxmw/R5doHfJdTz8iJtFzDqnLx6/4sjZxi2Oo02g3GoSXOqqyHqReZX+DenJ63HHz0oFTBz6fhAeGh23ecgUnvIz49o/5QzqneQPDcnUJQzbVc+DR5VMaoAPSVHMABRaO65SttlAlaRxwI5eiIOG58f14pJvkf++KatdeVOLqaR7czKfDkxmsMzGCaC9aOd3VRgO76mDkKvOqgEOa0BXWoc6LgeccH/OPx7Va0dcT+N1XYlVv1dIveSx6CGHqhFq1oTxBQzr+c3D/LSGpvWu0eRChx7CiKbvEWZ5fasDFUy94WQPMV0SgF0wiAJXn04I8DIKnWYFEU+g0BcfN+nJWRrIW3hHQQ6Bmj7+bftfgfd7kCjCuVmR/jcxLs9wKdog253d3DEJwbe+R8b7PzJn3t64r5+aLY8F1ZdwgYw7R4i3xWuiOkRPpDK6H9zbqsXw4ziJIttkbLyAe8S4MfrrCYrxBK+pLDVaIqIzrNL3S7dIj4LLDurSbcA4SKhNdDCAAw7IRQyPyrAl0zH+8J/pmczmUUTbwtQc5pm7wuHya0KXe9y76bTbltCgArHVaXfsJq3SAmYPyeG4VcSu7K7Ot3YbJSknYXpHBt6rOfdncxqPyDzS4HKDW79XzzYk0eqMd0kZXh8E9XSR+xEBWXA/R6Wz+9DdstPG8Nb5xdGZz8354nKJON0RYrM3nq0fEyPMwTyJwAshYMMCoR2nCvSgrY3UKlOFAKk1kaRyJE9fRi/dGDtJ4g3j1SQ== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 14:21:58.0210 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8fc40070-4bec-4459-1902-08dcf9b76109 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF0000013F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6276 Fix typos to the sysfs path referenced by NVIDIA uncore pmu kernel doc. Signed-off-by: Besar Wicaksono --- Documentation/admin-guide/perf/nvidia-pmu.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/admin-guide/perf/nvidia-pmu.rst b/Documentation/admin-guide/perf/nvidia-pmu.rst index 2e0d47cfe7ea..6e8ee0fcf471 100644 --- a/Documentation/admin-guide/perf/nvidia-pmu.rst +++ b/Documentation/admin-guide/perf/nvidia-pmu.rst @@ -34,7 +34,7 @@ strongly-ordered (SO) PCIE write traffic to local/remote memory. Please see traffic coverage. The events and configuration options of this PMU device are described in sysfs, -see /sys/bus/event_sources/devices/nvidia_scf_pmu_. +see /sys/bus/event_source/devices/nvidia_scf_pmu_. Example usage: @@ -66,7 +66,7 @@ Please see :ref:`NVIDIA_Uncore_PMU_Traffic_Coverage_Section` for more info about the PMU traffic coverage. The events and configuration options of this PMU device are described in sysfs, -see /sys/bus/event_sources/devices/nvidia_nvlink_c2c0_pmu_. +see /sys/bus/event_source/devices/nvidia_nvlink_c2c0_pmu_. Example usage: @@ -96,7 +96,7 @@ Please see :ref:`NVIDIA_Uncore_PMU_Traffic_Coverage_Section` for more info about the PMU traffic coverage. The events and configuration options of this PMU device are described in sysfs, -see /sys/bus/event_sources/devices/nvidia_nvlink_c2c1_pmu_. +see /sys/bus/event_source/devices/nvidia_nvlink_c2c1_pmu_. Example usage: @@ -125,13 +125,13 @@ to local memory. For PCIE traffic, this PMU captures read and relaxed ordered for more info about the PMU traffic coverage. The events and configuration options of this PMU device are described in sysfs, -see /sys/bus/event_sources/devices/nvidia_cnvlink_pmu_. +see /sys/bus/event_source/devices/nvidia_cnvlink_pmu_. Each SoC socket can be connected to one or more sockets via CNVLink. The user can use "rem_socket" bitmap parameter to select the remote socket(s) to monitor. Each bit represents the socket number, e.g. "rem_socket=0xE" corresponds to socket 1 to 3. -/sys/bus/event_sources/devices/nvidia_cnvlink_pmu_/format/rem_socket +/sys/bus/event_source/devices/nvidia_cnvlink_pmu_/format/rem_socket shows the valid bits that can be set in the "rem_socket" parameter. The PMU can not distinguish the remote traffic initiator, therefore it does not @@ -165,12 +165,12 @@ local/remote memory. Please see :ref:`NVIDIA_Uncore_PMU_Traffic_Coverage_Section for more info about the PMU traffic coverage. The events and configuration options of this PMU device are described in sysfs, -see /sys/bus/event_sources/devices/nvidia_pcie_pmu_. +see /sys/bus/event_source/devices/nvidia_pcie_pmu_. Each SoC socket can support multiple root ports. The user can use "root_port" bitmap parameter to select the port(s) to monitor, i.e. "root_port=0xF" corresponds to root port 0 to 3. -/sys/bus/event_sources/devices/nvidia_pcie_pmu_/format/root_port +/sys/bus/event_source/devices/nvidia_pcie_pmu_/format/root_port shows the valid bits that can be set in the "root_port" parameter. Example usage: From patchwork Thu Oct 31 14:21:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Besar Wicaksono X-Patchwork-Id: 2004690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=oYE56A4c; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.48.161; helo=sy.mirrors.kernel.org; envelope-from=linux-tegra+bounces-4074-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XfR5S1Vnqz1xwc for ; Fri, 1 Nov 2024 01:22:04 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C0B59B21AF6 for ; Thu, 31 Oct 2024 14:22:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 320D01A08B5; Thu, 31 Oct 2024 14:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="oYE56A4c" X-Original-To: linux-tegra@vger.kernel.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2080.outbound.protection.outlook.com [40.107.93.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E062E1A072A; Thu, 31 Oct 2024 14:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.80 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730384521; cv=fail; b=HBB2dmryNMBtBADpex/ibGLNPyqV7u3DOIDOH3HLdn2GEL1JU5ROrZ3doeWoVC7GkSk1SZTt7x9lGcHMJ2P2ApvuFAF+OkxOj9Fe5qJKegziNhvEhcYzO4TlJmstbLZyCyq6ka2QpAXSUOJ0MUV4b9elhzR8CYlgQWG1ASl0zTs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730384521; c=relaxed/simple; bh=9ZUcc/WsdfED62vd6Y+KYAeQKvqGxyIL3nzGXGIsw7E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Q3JDJYOs//2/DENLjcAY6PWus9yz8nCykoQMUQmBvXlxjhUn9zq+U+R9YCE75UXRzl/LYH7ZYujzCy0EjtOC03tA4YA+Hw2zNONREVHoBV+fChs4ZDo9Oe3b9ZXMGUQqHasQL1lCM5/snEC0tG0sMmplXc1guUn27L21i85krAY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=oYE56A4c; arc=fail smtp.client-ip=40.107.93.80 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YsGeHn9kgYQrYuoM9WNNIp8IX11Qes9gO7tEcV/WsZmvkH2yZhEp6Eb+duHXCB7KVp9mlud8ru+yyee7hQoD1kvxIYJdu329lZE/Z8z+E8Zgmouv9dwNgUpRuVo48ctgA7tUdt50XFdKO+XoCV+b/uZsYkBdLJzU7hNqXBNnEitN/pBf/pCehgh3+0xHZo7NNIfrQGG2IBtohjuSV+WAXd7j9lum/aKdkjINAEjuQc1gECD1hMhukFCAti9hXzWkzdk85+HXpBDH+pEXcENBA3F6fYh0sq0wzYsX2G/F+BqvC8ufBIlSpmQFDI6TeTZGx4aJ1Qv6gXr6w5af//44CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Sc0wayrCwhBP46xmuHB6xKkAAGt1sl6aBp4pTNM+u40=; b=yuiag9uuD9ZC3HB8rrNNCvGYsqRRsKdt2yoeHrf11AP1XUjXRx38UtQ4v6TYBIxcsWZ/cmfT+FEIPBsZar0ttsJRVVqnc2G9NvFXkk98IkB6UWigAG2l1kNsMT/TDCXBC9HOj54c6Wdp9qi3iavk9QmhjQDe7kCqRFT6fDw2GdTn+HC1JbnzibgrDAY0j2PdER2rQuBQ940ksIqmWlwMwsp82EOuF864u4ZBFIu+GzZA4NIrte6hXmgPhueRAzqeDUNJ+iQcikxjGkj5e2yS83yx6DNdMvxqtpye0VkIi8QxqRhfj07ULdqrag5JAstaN/9DajTIO4q3QPMD2sIQ4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Sc0wayrCwhBP46xmuHB6xKkAAGt1sl6aBp4pTNM+u40=; b=oYE56A4c6ouySqonD2ssRyFrBeYT4I6A7TwpLizCZzUhtL2sdsH3dZlFBfTSdzMdIVKJKESSjSkATCIvoYe+lZ8kPkkGErfkdfyp8WQ/qB6wot54Nr7R2YDc0A3Kmw3Zv3Uu7tNQYqhn12r2SUZxlfK+iIQ0nayuQ+gY18f4IWUt6NYzJTWay3lBasB5M9iJSgdkhGhElTac1JgHlXzlDaaJfKcqIPW8ZLg00Fya4cw+O9+v8zVmH0XtsXaZzNPw4oetUX4dfGcyJLhjCm4vWVXCoXoveDpHb0UFGqsNP+OYQy9ebe+KlTBqt90N3x5GI8pMUaD/oLHJ/PfhHpRqVQ== Received: from CH5PR04CA0021.namprd04.prod.outlook.com (2603:10b6:610:1f4::14) by CY8PR12MB7193.namprd12.prod.outlook.com (2603:10b6:930:5b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Thu, 31 Oct 2024 14:21:56 +0000 Received: from DS3PEPF000099DB.namprd04.prod.outlook.com (2603:10b6:610:1f4:cafe::b0) by CH5PR04CA0021.outlook.office365.com (2603:10b6:610:1f4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.23 via Frontend Transport; Thu, 31 Oct 2024 14:21:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS3PEPF000099DB.mail.protection.outlook.com (10.167.17.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.16 via Frontend Transport; Thu, 31 Oct 2024 14:21:55 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 31 Oct 2024 07:21:39 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 31 Oct 2024 07:21:39 -0700 Received: from build-bwicaksono-20240327T112120892.internal (10.127.8.12) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 31 Oct 2024 07:21:38 -0700 From: Besar Wicaksono To: , , , , CC: , , , , , , , , , Besar Wicaksono Subject: [PATCH v2 3/4] perf: arm_cspmu: nvidia: enable NVLINK-C2C port filtering Date: Thu, 31 Oct 2024 14:21:17 +0000 Message-ID: <20241031142118.1865965-4-bwicaksono@nvidia.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241031142118.1865965-1-bwicaksono@nvidia.com> References: <20241031142118.1865965-1-bwicaksono@nvidia.com> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DB:EE_|CY8PR12MB7193:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d90047c-8589-4397-e0ff-08dcf9b75fbf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: GyyMkssJUU0BG8AcPFb+2p+RGFXvvG0hM0oWQoTpNPBDlvhZ7b2cEmOn7iXNK+zEWbzPDWyuzyj9R8YMhLMIPpFfoj5kpI6zl2fwHCgHvfRvxqGXImKNEV0KEnltL8NP+wxY0kYAbRTch+Tmb38WQB2SOGahv4JhttBrjtHd+iy29Sj/MPjWcWWbATF8HoYgrPdX2RIehxtX6tFDc5hfOyEkrgw4nuP3HNRVxbJ7J+FL+jCywNtrnRBcq4BgxYDDl5LNthwKqSjxjvjJEe/cmPkpqcEP9UhUhMBvuuOhoJKCl2sfNG9I4OxmswViePuP8FB9/pxMRQRB5jiBsuAbnrDyUGyfgGa2GLZj5wIXvAqDMfhE5WvO6KXJBwAeBAJBJYcZfjSWi0cWOCN/RT/xwsjxbbTbNC2REy1DbQs2Q9UYM8I1gy7amwCkKemcQRzNCRMRrrZWXYEE55W0VHEDmyozeaOQ6JmsqX7HG+lIzECjNQOS8hLQ23THkLpA9zEcFooAxk3QgnzbjVHGEYhwD/RTIOTjg5AZMPht0AWfsyuqkcLZRSN2qnBxUiDw8vHh180oOp6b7RDDJ3zCUOw46eeV303xla90uAj1T84bTjyJfqKOmTTJCYvfGevcrUIg/HIzGw2KFFA43l8nd+1H+RlcNCNC501EMKmEngfvJylQ/9HuPJMk3sN99KMxR2hBxfBL+kepDuDBdJRsmXgPQIo1a7nyAB2v4RPCf+VgOVuLyVJZq6XO5QIQwocbBer03WBbijRQZLFfkgf3SoiT9RNzO+Dih9SOVdpihyZYea7cJC0VRr4/cQEqQK/BSYGXuyovAvFBc6LjxQaLT0HJe8+CBqODyQoNQCWvWe/+EsqS5aJ1aUUEIejLxaM5Fa/dGdxEcN64xgjzZPG7AZjCuSJ+shw4zYACb1I3ucgOd/mmFaesRFzYU7cZzMp3bA87FRwmyOeA45aHetPig1qDlyDuIVOjtx2jL5Q3h0SSDJ17cnzOeySdHD16KMY9UQQ8L+vBw+lXO0AhId349DT/pHHrQqzv2fiD4l/wnMv+kHl6QNqpkPakw8GtYe1jTkOz5IVvVAiLhap5q0Qo0W35y/3XXExgCQn0xSSsbXXvCb6UkZxQyfT61KzH2eerr+k95UUWpow5SGHU03cKfSa3YR8wT9nugsJOoghlx0dhOwcBwXkT+Dq5Y//JTEkx5euE97sxUuIhEdQ8RzP3zt1fKMK3rTCppHmFlHLMY+g5/tiXZeiEmNa6t3uIr53BIUV1wWeTfqx4bMRQiphYZreH6uJH6vM6RQLzMxLf+1aWpOA5PiR5XHE8tEyd+1BGjU8Wso6Wkma96IK2xyewT5tlNZxCuopoI7rSiq3VBUbJ2c/w0ApVYbHEFc8H9swQmdF4LfDBeJsETEfrUNUiOABHDA== X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 14:21:55.8947 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d90047c-8589-4397-e0ff-08dcf9b75fbf X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7193 Enable NVLINK-C2C port filtering to distinguish traffic from different GPUs connected to NVLINK-C2C. Signed-off-by: Besar Wicaksono --- Documentation/admin-guide/perf/nvidia-pmu.rst | 30 +++++++++++++++++++ drivers/perf/arm_cspmu/nvidia_cspmu.c | 5 ++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/perf/nvidia-pmu.rst b/Documentation/admin-guide/perf/nvidia-pmu.rst index 6e8ee0fcf471..4cfc806070d7 100644 --- a/Documentation/admin-guide/perf/nvidia-pmu.rst +++ b/Documentation/admin-guide/perf/nvidia-pmu.rst @@ -86,6 +86,21 @@ Example usage: perf stat -a -e nvidia_nvlink_c2c0_pmu_3/event=0x0/ +The NVLink-C2C has two ports that can be connected to one GPU (occupying both +ports) or to two GPUs (one GPU per port). The user can use "port" bitmap +parameter to select the port(s) to monitor. Each bit represents the port number, +e.g. "port=0x1" corresponds to port 0 and "port=0x3" is for port 0 and 1. + +Example for port filtering: + +* Count event id 0x0 from the GPU connected with socket 0 on port 0:: + + perf stat -a -e nvidia_nvlink_c2c0_pmu_0/event=0x0,port=0x1/ + +* Count event id 0x0 from the GPUs connected with socket 0 on port 0 and port 1:: + + perf stat -a -e nvidia_nvlink_c2c0_pmu_0/event=0x0,port=0x3/ + NVLink-C2C1 PMU ------------------- @@ -116,6 +131,21 @@ Example usage: perf stat -a -e nvidia_nvlink_c2c1_pmu_3/event=0x0/ +The NVLink-C2C has two ports that can be connected to one GPU (occupying both +ports) or to two GPUs (one GPU per port). The user can use "port" bitmap +parameter to select the port(s) to monitor. Each bit represents the port number, +e.g. "port=0x1" corresponds to port 0 and "port=0x3" is for port 0 and 1. + +Example for port filtering: + +* Count event id 0x0 from the GPU connected with socket 0 on port 0:: + + perf stat -a -e nvidia_nvlink_c2c1_pmu_0/event=0x0,port=0x1/ + +* Count event id 0x0 from the GPUs connected with socket 0 on port 0 and port 1:: + + perf stat -a -e nvidia_nvlink_c2c1_pmu_0/event=0x0,port=0x3/ + CNVLink PMU --------------- diff --git a/drivers/perf/arm_cspmu/nvidia_cspmu.c b/drivers/perf/arm_cspmu/nvidia_cspmu.c index ea2d44adfa7c..7ab7d76e4ca1 100644 --- a/drivers/perf/arm_cspmu/nvidia_cspmu.c +++ b/drivers/perf/arm_cspmu/nvidia_cspmu.c @@ -130,6 +130,7 @@ static struct attribute *pcie_pmu_format_attrs[] = { static struct attribute *nvlink_c2c_pmu_format_attrs[] = { ARM_CSPMU_FORMAT_EVENT_ATTR, + ARM_CSPMU_FORMAT_ATTR(port, "config1:0-1"), NULL, }; @@ -210,7 +211,7 @@ static const struct nv_cspmu_match nv_cspmu_match[] = { { .prodid = 0x104, .prodid_mask = NV_PRODID_MASK, - .filter_mask = 0x0, + .filter_mask = NV_NVL_C2C_FILTER_ID_MASK, .filter_default_val = NV_NVL_C2C_FILTER_ID_MASK, .name_pattern = "nvidia_nvlink_c2c1_pmu_%u", .name_fmt = NAME_FMT_SOCKET, @@ -220,7 +221,7 @@ static const struct nv_cspmu_match nv_cspmu_match[] = { { .prodid = 0x105, .prodid_mask = NV_PRODID_MASK, - .filter_mask = 0x0, + .filter_mask = NV_NVL_C2C_FILTER_ID_MASK, .filter_default_val = NV_NVL_C2C_FILTER_ID_MASK, .name_pattern = "nvidia_nvlink_c2c0_pmu_%u", .name_fmt = NAME_FMT_SOCKET, From patchwork Thu Oct 31 14:21:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Besar Wicaksono X-Patchwork-Id: 2004692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=aEXOj236; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-tegra+bounces-4076-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XfR5c5Kw1z1xwc for ; Fri, 1 Nov 2024 01:22:12 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 380771F220D3 for ; Thu, 31 Oct 2024 14:22:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF3BC1A2C04; Thu, 31 Oct 2024 14:22:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="aEXOj236" X-Original-To: linux-tegra@vger.kernel.org Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2077.outbound.protection.outlook.com [40.107.223.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BBC81A257A; Thu, 31 Oct 2024 14:22:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730384528; cv=fail; b=pf9et0J5F6zlGV6r/oB9+84aN4bSbE9j7DN7PBVzf2PZ/OfSRJmgrwDTkQ/aZEGjnEuYiD6r0Ose56ubTHGUoH/Go6lHt4U93soBbZPdtHif0EILfWRAO/xL7jUihd7X3+tluPacPgxo/8Jd2hI86ZrBGZY+5KKt+AhAOJTIfoo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730384528; c=relaxed/simple; bh=56gy57UVmWdlaxr4zy417pRgkedP91z8PB0Ob2Zjgsg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gpOdEFz+WH/HDxgdu94Uh1L9E0G05oMnZmc47FWc5E00VfNyyMBTUW4Xps64eigU9L94RFL+04beZ980TtGPBrbF2x7oNTffzVJW9E6DPphgurCPVUkl/Ok6uBJCu8w8HjCj6IANFnxZaci3XJkRKjuiIt1TIZaHHNO1LbtoLKU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=aEXOj236; arc=fail smtp.client-ip=40.107.223.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tpqSrOZlDn9zdKmWGCYFMob71AFzBIvO1qTiwfn6mc88CjacJE0HULbOm46BHqY7Ella07sEXpHXymxmRObWGrNOzFeuSELJ+9OClmtmvdzRWY/XXdz1+WKMamnmq35eeft7ZJnFl3di4f5hcI6TeU3iAI2P0AhIbP5MBb1S5/slpcfLb+pRxK5ZFg0fa0Mzei4D+7fibq3W7gey/3/iHxd4NLDnVFT/j5nyjoAurqy3x8vtvWUHdCsKZzE0ZdQvu6uQy6JGObttJEOAuqDQkZwFNEkwcHKIa8mkgzzL7IScvyDPhs2ZkjCwoTjolnsEmEGH33uV1LJCVQQ926O4eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mmRKjQOgFGj1LRb5alkgkuGmMIwz3rqvdpk8Ppd1Uos=; b=QxPS7BSfAVuvQma+vbvy2eG9UM1M4DyJlDwSyVBcksyELTe4BWrcXx7ha/yW0xDbWJkQwZcc/e0CBtfID7LIzMauUatKeOoFpc23HyKCUX9deTYygVWffulG2/qleOQ9Cz9VDiqP5wN/UaRoY/Ta3F+LmIUy45XE0CcKLpep3sH5N30wuPzX0j7Q4IjJW6Z5XgpjOgQRYsgoo0Yh3mbODCpSEcVKi6mFtUTYTxhLOmhhzcYSQ8vzACfFBB30JB6xV/m1LMWT0wwoh+M8WLt+BK6tZrHbQgbCEBVIYSBLm3wuQ66xuHkTumqX1y8pO6eZUF5JROvRSN+AO4NIs6nvWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mmRKjQOgFGj1LRb5alkgkuGmMIwz3rqvdpk8Ppd1Uos=; b=aEXOj236r9SZS+mX8l8na8wfvSP6KJDlw+z7bkvpP3RnfW+oUkPpgC5Uu7KyaBFohM8tLsaevTDMMDXEfuPJd6GhaEo51jJrDui/p4vZ+4R0OQtJ0EHE6SxaI0qY8pJpwARgV9BACKsvoMMD7FCNSwIvKZpNNpb5/jWguizsN1lqt6FVNGIkruQuOWDsPA3/p+FeYq1IXHjR+Tv3137qzuHCYNkZhN7rk3mulnBoHYgidLUvK8wVin6+knd410ie51Hbe8kEQd7iUCpNT8LJX0qg/3KYQfMWZyXYoXwfNjTa0DspwLStGz4HOM0vKfjP+3sSrzJUkjUNMxtGxpj3+A== Received: from CH5P220CA0003.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:1ef::21) by MN0PR12MB5978.namprd12.prod.outlook.com (2603:10b6:208:37d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.20; Thu, 31 Oct 2024 14:22:03 +0000 Received: from CH2PEPF0000013D.namprd02.prod.outlook.com (2603:10b6:610:1ef:cafe::4) by CH5P220CA0003.outlook.office365.com (2603:10b6:610:1ef::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.22 via Frontend Transport; Thu, 31 Oct 2024 14:22:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH2PEPF0000013D.mail.protection.outlook.com (10.167.244.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.16 via Frontend Transport; Thu, 31 Oct 2024 14:22:03 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 31 Oct 2024 07:21:42 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 31 Oct 2024 07:21:41 -0700 Received: from build-bwicaksono-20240327T112120892.internal (10.127.8.12) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 31 Oct 2024 07:21:41 -0700 From: Besar Wicaksono To: , , , , CC: , , , , , , , , , Besar Wicaksono Subject: [PATCH v2 4/4] perf: arm_cspmu: nvidia: monitor all ports by default Date: Thu, 31 Oct 2024 14:21:18 +0000 Message-ID: <20241031142118.1865965-5-bwicaksono@nvidia.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241031142118.1865965-1-bwicaksono@nvidia.com> References: <20241031142118.1865965-1-bwicaksono@nvidia.com> Precedence: bulk X-Mailing-List: linux-tegra@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000013D:EE_|MN0PR12MB5978:EE_ X-MS-Office365-Filtering-Correlation-Id: e3b2bda1-b999-4e37-cbbe-08dcf9b76409 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: aS0aE3r5bHI/RZbIK6PXQ0dHH2jtoWP+3+bi855K2/kMCcCgWW4uszMceUK/wFg1DDTjffUwuFKq4pxK8DrXsFmfXzA5OS4jj9ssYwT5DIQiIWvhbt0h8CBm2QFvqos0aNUkI5ApHVarUQ/9Nv/V51e2oJm8u/oY/fG9Ee6KuUOSjNB0Llp7Ob951K6MzxsQXCul/ECM5ZOAEYRIAHJwZoC1+yVbB8MXU1xMaM72jfcKW5RNRXsXiTFPVGXp/kGkT3EiCh+ThExMxSza9Njna5xQuwobIX+4AMIQCsC4ILDTBIHMrdH+ARRwOU9w4+2JskgNM6tzvg+8vwWgg8Y/dSiN6p7rWZAbZ1ZhYfbpf4ZUY/Tlg6SxuRdh7r5AwAx3uX+YWKhGs6b2xksZ9MliauWN/9GSJ2y2d96o6YzFgI3IK6NCZcEbnqst6N1OpyLnNOYsd7AdwvyisfQSU9NOtmUsuxtPl+qw6IvYJ/i16rotxjOXgD+SwhmX7DGOvYtWuXB67xiXJniVbAfLmW0CW0/vj+isJf4MoBYOKkwzrM5ca88l81bmgKe0u3hmGwFOy+Rqq50+JzPdRwaRKUtN8v4TYnrsCTZDz7ZP2UU9i780AB3o1p5jl8t5deFoflF8AhE31dEhOKXB8B09mzKiE+tsESt+bQTTFDvKwWECSHa2rmOZC+vvuhY6LfU9mm0g6//nKFXQY8wx1L02KkURJoxB49YCaRSfE/g9bPp7tkUaWELsuPp2HkvW2kapYAzN7mvkM8YTnlnyx3O3I+dpe7UDWB1gL+SUBU1ygAbF0Qu4Wg2IyhooEjIWO14BKa9ci85CoD8bcXM1Ykp8OCRUHh4WdUgaegseeO5OmymxY8khJ9gh665SEdrAqnQ/jp1U81D9ytOqdMgZV8049Tt0VHoTaYmq8xhRVRfHJqrz6vW5Tvu1aWyrr9LwO8rwicmdX8OhUoyyocBFnR7ZteOwGElq/QKChM3LwHMorn4tolZowz2a8WrskSlzfjAjAmWBUs0QZ3iOZ22c50Y+eZjyMg4KpRiVEgpAAJjz9fRZ33NSsEVP3O/H9TLoPMjGEORuRJrVoKnt/bg4FOe9Zi5cjWln8uKaRRA4C+48n64nyyhGNyDQfWmElwVFZE+QynkmpOHRuj5fsoe/0OUDvYZjyb4KygLucSt5T+IGR/kN8g0HGmVNi7ULUcxMgP8Z3d3JpdL4VxbnKTU6R4tErpS3nnSEA1fBOI9TeoSqgq2YT/gJoo0BGX8WIQDxEjkZLR3GAZZqfUqMnDdkeWXz13J1CeVHhgsHkw8kGSTPzd7ZJ3vQph5hj13nA4UMKGQ4r0xfwS/wY6RXNDbvYrmMzMYa4ToygqFg+P2VFHBGPUVlEbITW095PN9JQMEFx2kO6saQ+P5D3Qa06W22dEEGg52Zvg== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 14:22:03.0744 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3b2bda1-b999-4e37-cbbe-08dcf9b76409 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF0000013D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5978 Some NVIDIA PMUs like the NVLINK-C2C, CNVLINK, and PCIE PMU provide port filtering. If the port filter is set to zero, the counter of these PMUs will not capture any event. To avoid meaningless experiment, the driver sets the port filter value to a default non-zero value. Signed-off-by: Besar Wicaksono --- Documentation/admin-guide/perf/nvidia-pmu.rst | 12 ++++++++---- drivers/perf/arm_cspmu/nvidia_cspmu.c | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Documentation/admin-guide/perf/nvidia-pmu.rst b/Documentation/admin-guide/perf/nvidia-pmu.rst index 4cfc806070d7..f538ef67e0e8 100644 --- a/Documentation/admin-guide/perf/nvidia-pmu.rst +++ b/Documentation/admin-guide/perf/nvidia-pmu.rst @@ -89,7 +89,8 @@ Example usage: The NVLink-C2C has two ports that can be connected to one GPU (occupying both ports) or to two GPUs (one GPU per port). The user can use "port" bitmap parameter to select the port(s) to monitor. Each bit represents the port number, -e.g. "port=0x1" corresponds to port 0 and "port=0x3" is for port 0 and 1. +e.g. "port=0x1" corresponds to port 0 and "port=0x3" is for port 0 and 1. The +PMU will monitor both ports by default if not specified. Example for port filtering: @@ -134,7 +135,8 @@ Example usage: The NVLink-C2C has two ports that can be connected to one GPU (occupying both ports) or to two GPUs (one GPU per port). The user can use "port" bitmap parameter to select the port(s) to monitor. Each bit represents the port number, -e.g. "port=0x1" corresponds to port 0 and "port=0x3" is for port 0 and 1. +e.g. "port=0x1" corresponds to port 0 and "port=0x3" is for port 0 and 1. The +PMU will monitor both ports by default if not specified. Example for port filtering: @@ -160,7 +162,8 @@ see /sys/bus/event_source/devices/nvidia_cnvlink_pmu_. Each SoC socket can be connected to one or more sockets via CNVLink. The user can use "rem_socket" bitmap parameter to select the remote socket(s) to monitor. Each bit represents the socket number, e.g. "rem_socket=0xE" corresponds to -socket 1 to 3. +socket 1 to 3. The PMU will monitor all remote sockets by default if not +specified. /sys/bus/event_source/devices/nvidia_cnvlink_pmu_/format/rem_socket shows the valid bits that can be set in the "rem_socket" parameter. @@ -199,7 +202,8 @@ see /sys/bus/event_source/devices/nvidia_pcie_pmu_. Each SoC socket can support multiple root ports. The user can use "root_port" bitmap parameter to select the port(s) to monitor, i.e. -"root_port=0xF" corresponds to root port 0 to 3. +"root_port=0xF" corresponds to root port 0 to 3. The PMU will monitor all root +ports by default if not specified. /sys/bus/event_source/devices/nvidia_pcie_pmu_/format/root_port shows the valid bits that can be set in the "root_port" parameter. diff --git a/drivers/perf/arm_cspmu/nvidia_cspmu.c b/drivers/perf/arm_cspmu/nvidia_cspmu.c index 7ab7d76e4ca1..b926861b133a 100644 --- a/drivers/perf/arm_cspmu/nvidia_cspmu.c +++ b/drivers/perf/arm_cspmu/nvidia_cspmu.c @@ -175,10 +175,12 @@ static u32 nv_cspmu_event_filter(const struct perf_event *event) const struct nv_cspmu_ctx *ctx = to_nv_cspmu_ctx(to_arm_cspmu(event->pmu)); - if (ctx->filter_mask == 0) + const u32 filter_val = event->attr.config1 & ctx->filter_mask; + + if (filter_val == 0) return ctx->filter_default_val; - return event->attr.config1 & ctx->filter_mask; + return filter_val; } enum nv_cspmu_name_fmt {