From patchwork Wed Nov 6 19:37:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 13865462 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 0593FD59F6C for ; Wed, 6 Nov 2024 19:39:10 +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: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:In-Reply-To:References:List-Owner; bh=I/lUbTxaqWLpO2jwM0miN5zXaAb24E+6j43pOyerS0I=; b=tvDks4eqoEFETE/Cym2TDc0SUl +2gMBs7+GqaCzADP7kFdDLg6pttxL9pJcxs6JA8DaQQpyea6fIkyedlMxA9p3+4CxuBbyeuE3AAdR 1Uub0B9PNz2+8BuoiGBBw9JMCNqMq2AsFxs65oBpJ1USmZzsH7wkqKDxkiR/cpUaY/NIiTij5S/1c 0LXjehgyOiNoMEKAVEK9blDYOZamqUfl+TdEphHzRFgbEVG2MxIyyQ+xr/tJZABOFtAGZAa5Sn8kn r8VQbEaq+W8KbrzQvx0A+e6p/EXJ5XKKKSuNORF51LespOkJWf3LiUefK7/nz4PNPVt+KLL6Fjbh8 hY2GFz/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8lrn-00000004Xxv-2n1E; Wed, 06 Nov 2024 19:38:59 +0000 Received: from mail-eastusazlp170110003.outbound.protection.outlook.com ([2a01:111:f403:c101::3] helo=BL0PR05CU006.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t8lq2-00000004XY8-1P7v for linux-arm-kernel@lists.infradead.org; Wed, 06 Nov 2024 19:37:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BoxSPhcVJgBBlW2vAeujAd7yyC/94WXpdZ2sNPaiDNgpInHJFElxdIAXmFBC9uuvGFccoBkdZn8YF0uOqH9UHScaXTjt2bfsk6/2bCzRz1eUoRJOy3ru1brzbxcEvmmvG72o8EVIXFx3CB9eDzEUTxr70FOGeJRa15X8iKyDg4P499bB5gliNcVBHyZGIVvl/llulhcrWleBK+ittIwl2O/OHoYMo86Hbq7VFT9+Zl6JH8E/UhGecA5HIA2AZ+98Fsh3XZckOMBe9ca6Rv0arAohcPHHoc6XuD8TSSveYzXOQSTVyvck6ZUNgSP0XlCVWXafAEX3vWAx77yyjdA1KQ== 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=I/lUbTxaqWLpO2jwM0miN5zXaAb24E+6j43pOyerS0I=; b=Oi59dK9+w4+UJ0MUpEMvowUHOe1eo8TeFB4x/vFs9pmgNNvEfi9X5FyMY3Dtnh0Du/hZFx0vwH6mjU2Ci8UCTPjVV5Yv+kIj0+scLWvoCPy9W9beJCoeMor0el1q7et8GAqb2zI/BE/o8NSxXQxv1wtWLYBu98CttN1QOTAom1qZHG0gHJMvW2+E8dsJBR6s6MAe1J4PhTKzpvxu6d5LfxkbZEwj1yeQfwwz3dg7EadJlCpFuzL99fAtxU+vSwkzRfqxbLNmmklZc60nW5kfv7blkTM1fqr86AsXFtNZpvY9tYeCiYS8IDH8cbneTo3NnTzgE2q+pmHGEUoV8XKO6w== 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=I/lUbTxaqWLpO2jwM0miN5zXaAb24E+6j43pOyerS0I=; b=YWDeRcdD0Y5LmyJGqVXEgjWRGbEo9dSYJBgaB0rUchlJ3N28c26P3fazkmPgeR6b1wVWQloja71MTgKAqhIcn2Ckqdxu5BcPNN7ckL0OJfJca4eWDT+bFZY2+7GaM1HYcoR334H18KcLyO8wMgoouDxgtNh+qJ1w5g3fqim/ySk= 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 DS1PR01MB8775.prod.exchangelabs.com (2603:10b6:8:220::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18; Wed, 6 Nov 2024 19:37:04 +0000 Received: from MW4PR01MB6228.prod.exchangelabs.com ([fe80::13ba:df5b:8558:8bba]) by MW4PR01MB6228.prod.exchangelabs.com ([fe80::13ba:df5b:8558:8bba%3]) with mapi id 15.20.8137.018; Wed, 6 Nov 2024 19:37:04 +0000 From: Ilkka Koskinen To: John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , "Liang, Kan" , Graham Woodward Cc: Ilkka Koskinen , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] perf arm-spe: Add support for SPE Data Source packet on AmpereOne Date: Wed, 6 Nov 2024 19:37:38 +0000 Message-ID: <20241106193740.6159-1-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.47.0 X-ClientProxiedBy: CH0PR03CA0332.namprd03.prod.outlook.com (2603:10b6:610:11a::9) To MW4PR01MB6228.prod.exchangelabs.com (2603:10b6:303:76::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR01MB6228:EE_|DS1PR01MB8775:EE_ X-MS-Office365-Filtering-Correlation-Id: a6655d08-555a-4e7a-187b-08dcfe9a6442 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|52116014|7416014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: HW4gKospNLQXZb9OOqBNEIR8rW/OQUpv3YbRKeLaIsCJOLzAPG+XL7WWaQQ7nngJ+lB+s/jtuKD8bZnXgB9WzacaA3d0uXeGU67jspgshsMgxveFDwOz1qhE4Tb/bS36OCKD9z/06fSjg6zVXKWIOVYt8Q40tth2vnx18acfxsmenyO88r94fA0JaLbLhpVudlTT6wBbk6y3VH62Uv7d6awud3ABxu4XPeP3HP9yVdg8Q1Ufw9W9/5FdUZR6xfI74ubD9cyfxh4TVqoDAeFoVNneziHp9o6eXeqTwhhbnXEGqau1FW5Iq/PE4dkPK5sZ01/u+zNy4i8e+63gwMuQXPQJXeRr4/YP1rcG6STDSaA7pwJf+XxJiTx+zq4yDF3dS3i+NHLHspGUxLBrV+ljIE8PKJgznDHkhEsyny9SulSH93eHBWOVQ2Dp5Xq8CB2TF5Ydz3SENEkC75Yv4aMGPH7Afdrrm/vH6q62qgJu/5zglCeHq2W8+9NspE3qRny5kq3aCcBg9DfY9KGlKw/Tlo/YnVbDYRG+c5rKr5YfLCAdEjH35GzrTzlOCJZPkAsktpDk+5o/5nitxDyZRMk3PtQjcsl31dnS2PWTO3W3FwbtTJ6LPsZN4c1tePQQJIMFcDtsgT125ok5hpmwyTdNny61+/C1LVmwsuXhuPaR4oss5hHfd+L21GtaNpmgJ+WNuTuwBAo/NVFIRj/EIugZfSKC2xnhShT/j7Bqos4xMeWkXgmbvV2xGr7QBTSeddVjRE9yz2yp8OisbcMgE/1lMNchIV0d4FQyWo+2+w93C9uQa21cA/sVc+4TvqAqdfW/86e1r8+qfLG2TITP9TbPyzNo25SNfCTqIgm9P7HY1gQEC+dSHx6WPsieUcSjxf0qxXspdPL3DY1ieigoubIxkkO+8kkp+D1NahnzwnxwB9xWg8S+bCp9O9my+TMY5yO0QfC1+KuLpmTUFE1Gl5AhHxdjKNA9SMhLWki7J2B+KBn5UpWegCYaHa2m4VRENrCUjax+LnWH+JKOhab9emALlXhBWpZQ2sGRTLdyp6pRbB1VZhFnjcJKyPWWLymKoCyvvVJueGw1e80NVCTM7kirar2ftPTnz3L5Pw0wgBOvd3Ba6wG0c9gBlZq8iTqXw4nvNiKziSpUl+eVhXJGnV5AhgtxKeaErN/eiJ7J3yCmbeNuFGDtQf6590bwROLgpHfiBbxsFqr7MrSpBlEEI4RU11BTeuKAzH59VUyvBWBBzn1RM992rDYs9nPe7v5TPN4u6f2ld0HlBSGtaXAuhr6NKXf781teRa/J4fhQMIYOP7f04tv91Eg3ag1Cf23aTlnUKFimdLwSgJROYfh8Bcc77iUKcctMbQozzEk3Xf6mSk8/HrQ7cZbnnbQu3m+l6XvZ 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)(376014)(52116014)(7416014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1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kdN260uOyEY0ov0QgIFHyLC3blrNmnZG/RhZgl2JSLdtmQJWWc0bCaecvF2NxIY3XubCdJe/KxC/cXrybNkJ9XljP9wOHYYV9CAkqf38o18CCnEiFIc49A3Jsj8hTKBft9cd9IeeWn64+gwyjaoWpQmTEmQa0O1xiprIg/Ilg7H6A+cka8U9NTTc+ZTrZb1LDZSp4vMNZUIbX90A8jh7BBy1+LyN7/XkKTT7VObgPRmhcanOK26kV2+KfCgOQbE/CQM/uFVWuZy4+MKDiyzRLEqyD8Vp2BzJKFg8UxNuba/gFozLRBipNNIuR0K/CgF7Js1dhutZowra4XGvgJoJ/Crm7zDF8YsDLqLPYoiF8yi99ZPAS1Gft4IQqWmHYGb7CtxOxMGvtqrtzNkGmMSdvpSA60Vv5yZD+HLeQEjPudm+surrltlBb0aDIfUxGcRt/kPBUV82A8N2duD52FhBxS7z6uY7yQsiHD78490EuXxoYOG39Xut1Zo/2ArmEPRshqpwHNgHV2RwwK6uWmXgEPeIteAWKmg5OqwFfkOnxpkQ05JAmjOD4TaMw1xgd6mnHRqUAOeR6RkL5vEMZ6A/nqvVjM= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6655d08-555a-4e7a-187b-08dcfe9a6442 X-MS-Exchange-CrossTenant-AuthSource: MW4PR01MB6228.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2024 19:37:04.2444 (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: hjvdHmo2bZuypxefHv1FgzoS3BsqrnpkNuqDd+/IBLV4fkQrkVoTq2Zw6El9dwTmbYzYUqhhEy2v8pz1zpezE5zKoSvUUZQ656paIVOB74nBCxUO4tnbauSUIPxJvQqc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8775 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241106_113710_545869_B168C4EF X-CRM114-Status: UNSURE ( 9.51 ) 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 v1: * https://lore.kernel.org/all/20241024233035.7979-1-ilkka@os.amperecomputing.com/ v2: * Doesn't use read_cpuid_implementor() anymore as that was broken and unnecessary. * Convert AmpereOne source field to matching common source fields to avoid duplicating the code. * Rebased on top of perf-tools-next/perf-tools-next (ba993e5ada1d) * https://lore.kernel.org/all/20241031213533.11148-1-ilkka@os.amperecomputing.com/ v3: * Changed source mapping to simple switch statement * Dropped is_xyz() stuff * Added table to map midr to data source decoding function Ilkka Koskinen (2): perf arm-spe: Prepare for adding data source packet implementations for other cores perf arm-spe: Add support for SPE Data Source packet on AmpereOne .../util/arm-spe-decoder/arm-spe-decoder.h | 9 ++ tools/perf/util/arm-spe.c | 104 +++++++++++++----- 2 files changed, 88 insertions(+), 25 deletions(-)