From patchwork Fri Nov 8 20:29:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 13868957 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 A9A28D64088 for ; Fri, 8 Nov 2024 20:31:04 +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=JwOm0CEu3A8roUNtHXENy0xHJzQ39E0vUsLlmqezsV4=; b=r1sb2C9/d5Tih5MofEcfGid5I5 JSjC9X1l06AQTDN5e3Njdr48sTggisd47UbihpOXjlANpS06GYE0rxX/Md8rYq6J9rrc2hh9qHtms +uLq+1u6lmX3Sd77lmsn432WvijRIIgveehBnutiD+H8LKxL1Lr8Pao5NBaXb3uete04FiJLQOdZ0 KIcjkXdLCe9y3gKTxv4BB4EssL5kVRG7NWK3DoXakueTHTLOkTAKPSVyIU+fjhp1gebgSCswO3jEr x/dMfa6je9sDL3SE7T1xGY1+KVYNXesJojB6E3MaXfoV4I/zked3mGJKKIWAUqYCt1Nrs2zX5d0bB kRHQhK+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t9Vd8-0000000BtrD-2pOR; Fri, 08 Nov 2024 20:30:54 +0000 Received: from mail-centralusazlp170100005.outbound.protection.outlook.com ([2a01:111:f403:c111::5] helo=DM1PR04CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t9VbL-0000000Btc5-3lt8 for linux-arm-kernel@lists.infradead.org; Fri, 08 Nov 2024 20:29:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eVr28qGdJWAkXgyWgQtg3qTPm29xGsj38mwvOhGF1VlA7CEgmP8czD57S0cM+MRN2d+8QjhTKEWqs5DFvGu/VPoUIsbSOYF1QSdlz0koG9j3T9NG5yuh/Vuig3HHnaR8P8kQsD75N8ndgca7ilnYxCk5UBsjJZlcwRAOjUvx8lsKhTAUNGC33BLERT5BKk/qRwyby9xiczUDuxUq7vZITd7aqPTFWf60013cLf+H4BijwQH26Rb6RUB57uuXwWglyJ4nGz+APgdepSdKmWhzvTmt8gnJAzx4wTVEifIx977MNPsI+eN5FXuENTtNdAKB+iWrf/uyYuZndXQ6zEYRmQ== 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=JwOm0CEu3A8roUNtHXENy0xHJzQ39E0vUsLlmqezsV4=; b=dwj0REzCKKJJNGwQNvXfI31Fp83tL8bVqxmwoH5wzHzAyyHDyqR0r3/Vbi7g1eIH8wyCq+/cjwyHRcFFJhok1u/M5jjweLw7b5YuIjKUBC9P3/MzBZwhNn5W5Be/ES0AWhtBkAzp3T3Cz+pl79qvbd6chyqNkeOmakgSk2mOtDSp3VSQh3vM5I5G5/ZCDbMfYJkRWv1uVsOAwCZ9HEV/9xJluBbFmiKdGyhqsdhILDIMZUQw9kTEdkiasuOCkeN/cxfpJ/91uf6g/+4Bwon7VxnlcKlASjnXVZhTqikEUvgQuhszyYJnNvCI1wLS1yUPf2uBDQBMqt2Br73kKNzY3Q== 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=JwOm0CEu3A8roUNtHXENy0xHJzQ39E0vUsLlmqezsV4=; b=n0mlCscqd8eExREQUMwfNcV74CUIUWr79MDEkiqFf8A/cy1kzao1+WSgUUoNMS20KSdFUHlXkWwqcPUSR3NwiNcFGtqiuK0+SbtEpxIbYONIgl3r3p45ham0xn859L4IH47blGdFITPEv/m3ajPkL1enUBiKTUkUcn5PytO8lsM= 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 SN4PR01MB7456.prod.exchangelabs.com (2603:10b6:806:203::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.12; Fri, 8 Nov 2024 20:29:00 +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; Fri, 8 Nov 2024 20:28:59 +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 v5 0/2] [PATCH v4 0/2] perf arm-spe: Add support for SPE Data Source packet on AmpereOne Date: Fri, 8 Nov 2024 20:29:44 +0000 Message-ID: <20241108202946.16835-1-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.47.0 X-ClientProxiedBy: CH0PR03CA0255.namprd03.prod.outlook.com (2603:10b6:610:e5::20) To MW4PR01MB6228.prod.exchangelabs.com (2603:10b6:303:76::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR01MB6228:EE_|SN4PR01MB7456:EE_ X-MS-Office365-Filtering-Correlation-Id: 41f9c677-d892-4c21-2200-08dd0033fa2d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|366016|52116014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: u7+xB0uQqTFXVNrjBkgybW2w/uFTbeij0xHlGUCR7bDw7x39eGISbUitiri5m9HYCyq2j+xcXSZr2I2jLv96K0Texzr+YMH8XEz/9FedMIL80vQqVxfb8Mp4uf3Awhwsvg2jTKQy7E+t93FWC4DlUxdrbco8GTr3wrVatjbjfrO4xwMkkHvFzIjwP1Wx1Ns/jyp60V7k4tljLYEtOinIOIBXoUr3ghxI5gqqqNUNymJ26c7iaBFIJKPanJi808OvO1C70BtTNG90edk79EVXHQtN6noLCQLdD4/YAhcQgzfCyhtpLoeQkzgi8JmRCgQHAhGcHWR0ZeN1SehFubX/iIYFMOpJeuny+Fhi5yEZ0dnVQKulDWhLJFegt6rJzEyK2a73wpgZTkxHs0iLAiU2B1V5ztnqVgAQEBDUtMfZVrz6hIn3bp+u2wYB93hKzwrD9LTFU9Eo4caWQbWTqPPaPFckO9oidhJryUznUzdz8OVzrmE1UHQKtenPjR7OtHFUn4MJv92xCHo00UAnDYGAE89f5MFG6qUSuITjmiv9kKEp6t2/2fk83eSXSt+2omfzqLlXHsowoosa0kBqjWwdrS4Z3gxkGcFILkTCVZx0FAh1ioX88kr0AWxkvlymTju2z1eBpSXP0roJeWggDoOyVD+tvxj3FZA/tJJbkL37O7ZZu6+FQB/hHctuiurmNDlYBF8XqO0AAR4Lppq9g/IvJwceOg8L1MM+TIHVjvOo00vdBLIaSZzXPvla2PE0mGgs/kbLml0icP5WOdzI43W/+kTDMLOVGg4fyevWyBlV39SE575CssohYxcwxkqzp9LiY0yTmn7/QXfYn67xGn71HUpNVQuNG9vBzcKNFLaJEwvi4luaN3p/ZsyyrLzc838QwQJ6erxgc1JudqEzK3ieIywLREMgAW2P+W3PWxJACuwqDlCNwAYRF90Jw3JDG58RYkadeVeSKDw28UEjWKJ8l/AvHweaa+QbuBHkKHo+4Iq9lehNCpNdJb1E/FgSnG4KmQpqL+prdXFdFYjL5z6GGUJT20IfGhGR7iPcfvX4hwoYkvQMzDAzvzcEMmiHlTPclcXtlwTyDTnlxAG/W59tPmD0qaMs/xdRkdulUN+3UDd2HKDZPzRu9Cf7sQUf5x41Hn+lVZb2SKnIr9UvAl4c10ojiy2mDBilf60a2PZBNLgMCHqnESSNx10DyXlkjYog9bGw+tPzXZptaksQ54J1zewES0UQzH799VIjGUGsB2aEbgR4auoC5eB3E9rzm+sLmIxOAhxhIucUSNR4k4WvqBV4sUOnfIXllY23Y4NQGhGMZFTD55p0dNqC3229Kt9WtNcfvR9KePYhlfLzUQVpXuBFBvc8vTdGWOM7v3uiYa+MyLxPKIFHVQ1oN8kx5O5m 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)(1800799024)(7416014)(366016)(52116014)(376014)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9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NFPviQjiwPzAj73w5zRIURE3zRL6lVuXcI0h/qWPyoom7CIzTRoVywl7iugZhqucyyoJG1Eiv6RhKvwI5ngGDoY88s1HMnzL+6xo9tDqUwTY1B49XQqf1YMGIIW7mdqjrs2x9bpKcJr9tFE1MIzYseMu2c4AFRY44cPqBakLAgHiZlK0nnMnPeU85fc5rBdblxajZAH+Bd0Ew1G+qEOOSH7sq66ZDo0tkUq30muhuW+GgRZlVlHLvTogmdBXe2WkSSE/a/Kpd9CiwLJuHLr9pOkjIyBTjQ7/XogJz7scMr3A8bwC/YEmVdpwEMpUpYabxq6jnQFzmy0BTnmYSVvLZPj1/O12aJQ9Tc4JPRNCgBdTPP/T/wj5P8z/83Auva6bPlINQue6ybqcx+WPZDnOkq9jZRtHHYcNLNvi8Z4apqvK1mHA94G1vufq7ZpB01npDQP2nsqyCf21U6sGEVu5cD/JaicWsWkYtUmilz92YeVKQ2FHwAC8a0ZNq8ErdZ+HkU6vCRtQ8n+4JikWuyJsWRcZ5eSSgDMBjmoRa3j1q3VEjT9WYztOGyFfsMbntfvdVVSE8k= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41f9c677-d892-4c21-2200-08dd0033fa2d X-MS-Exchange-CrossTenant-AuthSource: MW4PR01MB6228.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 20:28:59.8987 (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: OrE4MhqX56z/R/1ae0YzfbdaIW2zRHlRsRdzTGleyIVu77fdua9Xw4FjNEjU5mHEHVQ9yEt6iVChSXAvvGFw6jUsJ/+emSOGH5zq4uxY0u/RLVX+uMWVp15VRGPyw9au X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR01MB7456 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241108_122903_966115_D4FA2CD6 X-CRM114-Status: UNSURE ( 9.19 ) 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 * https://lore.kernel.org/all/20241106193740.6159-1-ilkka@os.amperecomputing.com/ v4: * Split midr/decoding function table * Made AmpereOne DS decoding function to ignore unknown sources * https://lore.kernel.org/all/20241108010911.58412-1-ilkka@os.amperecomputing.com/ v5: * Moved data_source_handles[] to fix the build issue 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 | 86 ++++++++++++++++--- 2 files changed, 83 insertions(+), 12 deletions(-) Reviewed-by: James Clark