From patchwork Tue Oct 8 23:18:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 13827202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46DC3CF042B for ; Tue, 8 Oct 2024 23:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=x+OOidj88uL/R5SQ6fv26x8Tuc/FiDvVh1S3Uq5UsPc=; b=WeVs6EGlk2l+7VJXIjyh0ebNfG M+0Cwk0MHiQQmX8YWgWJ8opPJ4BQNn4wNkuFa3n8I0d9JERX1SSDvpTapb2kA6Rdrdpsu7RVI3vG+ z//nGHQnO6gsUrLyxTimzWoukGduUB0R+ASDhb174MRBLkAHhMEG6y0Et5SDphD5rCwJSWqkjykyy DP7+WebNEHY8SP6yvOERaxa1lao88kfRUUZZC0SvO1kLJcGku48tWzXhZJeZYPzdxYHRBhgWTGP9s ZCSBg4itjErzihMlRJ83zKkszrQMfVKR7oUjCgvxKxWGEyv4sjJsHWUvnuOLuqX/Zj0ryZqY+9FYb dUjzGK5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syJXj-00000007QJt-2PNi; Tue, 08 Oct 2024 23:23:03 +0000 Received: from mail-westcentralusazlp170130007.outbound.protection.outlook.com ([2a01:111:f403:c112::7] helo=CY3PR05CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syJTm-00000007PPz-08i9 for linux-arm-kernel@lists.infradead.org; Tue, 08 Oct 2024 23:18:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QO7k7o8iAVd/q4rLiu8ACQD4PcsoDd0wX5GB+RsLS9OCiGiqWDnCA8E2zPdvXeztH2dJZPKtTfa/pqT1p0H+dkjbjeBHdi91LQQ0txZ5fmwxZ2o8OFPOMOFePjA4FwD2/jLLFV3N6+Ear3UUu9aejJdyMY917mt+J97dguQL1yKDx5BU6FcokepX1c1ojYoPtEZv6aaSDCA7jKJtMN/qWMCAEaZhn7c0mFIJff0sKy2Aip85SdyPXdnLYMiB+FdkonIYyhr/QkWOWIeKDDytMbcGm/RP/0QXzokvQQzRxsPx/qTG9hkcrAepF/AOXlP6sE8zpsN2acm/8lF2TBH1gg== 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=x+OOidj88uL/R5SQ6fv26x8Tuc/FiDvVh1S3Uq5UsPc=; b=kGa9WnSbIjiXlFsvVC29YLfY03mn8p/Shl+FvEJwE0W+qdD2M25tUpwOD6HvqtgkyMUajiuQJ0WOqJ+nTopW+LAR6hy2gcLP19bl5B/mpn+uyMwM/cMXi/NjyzRP94SazXgT8XN4hoUdUuHFH+TuXnvwFxZsnFfe+ssJ2VSmO/gpKG0GJeG4ulk3KO3WEHD4PTLM4eRWFny1XopPH/yiwZpX2qPkQI22u5lUZIfUVFQo6XspVhJZc7ZYBSzB6X6E86WrbMagjsiebaOYSVCAE9ipAGkQfLmAd1Pvc3xMV7kxp7CorCTJVk4KSNSPeXW3p80IxFDWqjW3p60jU6RYdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x+OOidj88uL/R5SQ6fv26x8Tuc/FiDvVh1S3Uq5UsPc=; b=kPWJNPJa0mBE1sJzrp0NIBnbk/kdruZSEyioUuaTMRT4KV8FxxMHVEioFjlrvjfMQS2jNDosYwvzqKz2tf/96kvAem/w/pPoXPsSeLvoEQrAR5oMaRWOnp1p1ThOTj3+JZTBa98rH6dyPPziRlgGxvr13j3lbzBAGAFS8apPs34= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from MW4PR01MB6228.prod.exchangelabs.com (2603:10b6:303:76::7) by LV3PR01MB8463.prod.exchangelabs.com (2603:10b6:408:1a2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.29; Tue, 8 Oct 2024 23:18:47 +0000 Received: from MW4PR01MB6228.prod.exchangelabs.com ([fe80::13ba:df5b:8558:8bba]) by MW4PR01MB6228.prod.exchangelabs.com ([fe80::13ba:df5b:8558:8bba%7]) with mapi id 15.20.7982.033; Tue, 8 Oct 2024 23:18:47 +0000 From: Ilkka Koskinen To: Shuai Xue , Jing Zhang , Will Deacon Cc: Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ilkka Koskinen Subject: [PATCH 2/3] perf/dwc_pcie: Load DesignWare PCIe PMU driver automatically on Ampere SoCs Date: Tue, 8 Oct 2024 23:18:23 +0000 Message-ID: <20241008231824.5102-3-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241008231824.5102-1-ilkka@os.amperecomputing.com> References: <20241008231824.5102-1-ilkka@os.amperecomputing.com> X-ClientProxiedBy: CYZPR19CA0023.namprd19.prod.outlook.com (2603:10b6:930:8e::29) To MW4PR01MB6228.prod.exchangelabs.com (2603:10b6:303:76::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR01MB6228:EE_|LV3PR01MB8463:EE_ X-MS-Office365-Filtering-Correlation-Id: c54889d9-98eb-4378-9636-08dce7ef8faf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: LH0SvkR6LPOyDXYlDjRTtegWNchq3EIx2IwuWtHHzs8GP8c+A40kcvIPHYx7VkRz5BAc8l2/HGNeKKFvBgpZrEWDHoJBkkZ9LZsPLNqRHN+cxPpfwAOJG0E+dcosLYqaoTe3U9RV7HPVq+fZB1cnEjhbi7PWgWLp2mpKMjPo+xmbp6ex/pzXddxDpSjoVEQOKLAUUGsS24jxGoBd6o7VkCl04NsoFKoxKYcAg5TvdsVWpYm6cdPI8NAxtxW3ZdI1zrE8yzRbqZCWjnnJW1Ubg41XDyUG30CForubWKYzn7uVZfZjAJBBTa5bRyghOl1zALL/wCpLB5FaE3MCvGNYPuuJpIxbPpVX9T8iG+maiHXgIXq9nGhTP0XGZhuOg55m5FwfhCTYDSkLynVySMgdacBfNVmTVx2gL3oSkyJ+atf1j4kgYZsJlbQjjLiM0dlehifGC/TAkGR6PWLqi3NCKOAwR0NMPnkWfnu0Ea7PDXnfWsCBI8p6vGrZdZIElufSZWRiR4Sf0zfd0T4bPDieIolnNylqxYAU2wyCYA5uwS+zRew4LqLH9N1pfXOo27e31QlLPqDfl3XBO+GQkNVIbIliwQ3Kyq4jz41URNh5WqiWPtIMJSM1PQqd+q6aknPqIGIneMZAJWi0LcPDq8YR4FllCcW9x1Q6M52FC1ojGP7fxSsau4z8vg2i5X0I2Og0a+dTjIDOWiTsosCsk+eY+oa/bNe6g37nKU7/YVE6N93kx3EbMv8mUOILRJx9NYrulnv91WyJMldc3q6NRacbBfIRPfCJ6EPba8ZuImJOhbKveHMMwZCdWM9a14c37ckyPC13K8oIo4lNxyAXc5ITLjjvR4t6KHb711pfs3xrbKPHTrsCucS8xT8lWuhML5w5sLpqIXlUBabdAo42GRmn3a4z9QztDE413K75pEikHyBgJmNOjjYW1L9O2+GRj7eZbN7wMR5BES6fSe51CZeTzr1lfbCLlrlU2Biy6BxcyjxOz/rZe4bsjGOvRWtLstjN/glQH+JXvdWwoLhb8fvQmoztTyLjp4ZXDgJsdHREEoWmFkFQaEgLrBwjvsxEAZv2ArKDt1oba5oEIRDSjQv+zB3AASXS3UuPm28LrIWrPh42hsjJT+SaGRYhiwEy8vWGN//4C86/A+xioHak31/0U7YLXVVcK1NTZ9yezzcVTV+q3jWQo/37GBiJQAJSQnjGSrRAXc7Ekc1cmTqePmvDICCo4COBcXFK7lZdBD6IAAn3b8eOZR4ue0XxOqCNgRRwQcGTQASApcj8I/X5DNo6P7BvOOnYFLlTCCdYDg4togX05hN66d5MPulyS3IwBdaeU+QyPd46W8ihGHRH6XXrCg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR01MB6228.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: L3xOjJMq2SqOZiQ4CqjClaJML6fa17ZDDSa8MVCjQO9elLTw9q/cZSmqBxUy9kx4iNKJetfgXpbqt7g4iP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HLJfS3KH9ng7BSLhuxwcCAuhF0GbvNkiV30p96qS9SqsK5MzenFmqevyEcp7Q1EVABYixx1g/b0/BnrwT6XXx5F+Ma6XkW8gBGUrjVYddz3zEM9U0+3c9HaJjdWnItVOw54sHmivDjhM8CBbSkATU545PGAZLn4mN3VHTpoJrgBoSOp0e+decNpBlVg///JlCBVpGf2SstDJEMZ2Gavx8YaV5PJECnnLqJtzdoFX8xIvN8rK3Bt3l5cRWcBALy9H+xqqK7U7WJqKx5esAw+GmQnBy10/epWw6RblKqHzaP4D32xmkFkSfb6wr0m22H50yyo9RecsPkD3ofZECC6XgkzScQ6GlRtY1AGrM/L5IxTBj1EArGNWqX7abHJhNYUEhirAyHm0EyqlaiTg4NmnMYKS39pTX2DHujukK4DyIeqhV+IZ59yA6OENqVcwfFyzjeNDNaJxAglQUaRwRoD63gBDW0= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: c54889d9-98eb-4378-9636-08dce7ef8faf X-MS-Exchange-CrossTenant-AuthSource: MW4PR01MB6228.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 23:18:47.5457 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5NCNpDrDouh+vmc6B+kShbZkWuuEPC3HYpmSmkPJWtw+Dn2IBwDcQ6rZ5jNvCGOyNodl3Vzfz094IxEwrBEc3TDszgexSX1F7gx5on7HopaQB220WyJ2Yqv0B9Fd2PlE X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR01MB8463 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241008_161858_101180_1E2D2747 X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Load DesignWare PCIe PMU driver automatically if the system has a PCI bridge by Ampere. Signed-off-by: Ilkka Koskinen --- drivers/perf/dwc_pcie_pmu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/perf/dwc_pcie_pmu.c b/drivers/perf/dwc_pcie_pmu.c index 3581d916d851..d752168733cf 100644 --- a/drivers/perf/dwc_pcie_pmu.c +++ b/drivers/perf/dwc_pcie_pmu.c @@ -782,6 +782,16 @@ static void __exit dwc_pcie_pmu_exit(void) module_init(dwc_pcie_pmu_init); module_exit(dwc_pcie_pmu_exit); +static const struct pci_device_id dwc_pcie_pmu_table[] = { + { + PCI_DEVICE(PCI_VENDOR_ID_AMPERE, PCI_ANY_ID), + .class = PCI_CLASS_BRIDGE_PCI_NORMAL, + .class_mask = ~0, + }, + { } +}; +MODULE_DEVICE_TABLE(pci, dwc_pcie_pmu_table); + MODULE_DESCRIPTION("PMU driver for DesignWare Cores PCI Express Controller"); MODULE_AUTHOR("Shuai Xue "); MODULE_LICENSE("GPL v2");