From patchwork Fri Mar 29 01:32:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilkka Koskinen X-Patchwork-Id: 13609870 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 BC8B2CD1288 for ; Fri, 29 Mar 2024 01:33: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=jsVhFHJXSxARffWXSnnFiN8bQPMmlBXlBO0Hr6b95kA=; b=JzSvOeaCBW5TdD t16GDe+yELdvYpvzbyhkGkx3YuN67j3MBP9RKItDmLhjh0wqNROgxZami/sY6+/BvfPRh9PF0sIAA pQmWmc/IhLTOy9fWOdBBwrTnwMhax/7QvhFpZ9PMu/2sE/tTK0a6iGngw4iSZW3F2XvGWkievvPgZ +FFBn9u6dJ6MVyLa2ULKmT18f0vOWmB2CCGPB6FQRgTrWvVPb+OUxs2kF2xkf5tl1nT1zrD/pKAf7 m7cqz6nPrkG0elDqX/ERuVK+8TeD+rSynQfY2njwPf0Um6Gmqb0GdrQaeLfuQMPJ9BS/pJ/P2DOCn Nv1yWgNIeYJktkQrVcCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq16x-0000000GOCl-2Ell; Fri, 29 Mar 2024 01:32:51 +0000 Received: from mail-co1nam11on20701.outbound.protection.outlook.com ([2a01:111:f403:2416::701] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rq16v-0000000GOBw-0WZl for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2024 01:32:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LmUcT8aUS8um1SuGdvCTt5gv6vKeRa2cq9N2gkc4ykfi3qUnlf6XLthwWNlEwzFoHw1pl6Lg60eOezllsvnPnY6iJf8sUOJ0rMN8cyRURDsWFVEIczDM2esxO9jfk18R3XgRMOwJfhc/K0IgAfz8hAD9bRuC56pLSAnJ/NbWvj92VsJE1Kg2a55yc149VDFgDmWwvxTtwoBpn5l5h9pOJC6Q3vkvBOLs5qsdki+PM5I9FyND82rYG8ZyqQ5bpBVLuDeU3AJHbrwR2o+XbPyKtQk0aNCa22rcSlwjvdgHKnp47L6amh0zKCEkZ8JXLy0jWiOzMI05+SGZyzxivcyi0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Jk2e9KFtNVUFkWiS7bpjbt1VopeeLdQqwIhnK+xhUNI=; b=cQSECR3yZfLV5hsgJTzpxj14A1yYxFZq7zeUX1sjqv4owlz1gPfejcEjH0PCEmG3b5DGWZhCivnoYDBrgd8xdK6BT0Ml966oPkTwcdvUaoeEyUfZKHmiZ/IjkPT/g9GZzpTbe94nve46tQJonLjULxHYWiKSoA/UQbqVRz+H1lAwYSzWscrYU/qSvXElbBs3qCBSpv2T5EALP6GpFVMIZaqNJB4so6pfrBjvxQC0c7EnNQus+48fgAmOP1bf2VWlZcG3Bdx4lZD9khyLV2sxRimBGSkNgkfBOPq3iEywUdm65RVgUCFiDLVQi2Y1cXJg3apXY8bfNh4flkSbtKsDdg== 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=Jk2e9KFtNVUFkWiS7bpjbt1VopeeLdQqwIhnK+xhUNI=; b=T5OLUA3It7HXApmqfLVsZ8oVkcPr1v0ZcDa1lVU4Y8gWhcCofdWndbj2MYSyxsvqwAZp8B9zFahuqlJtGa4409DmhuklghqqxPJOxKmcgrTgirAIEKQcmC9wTz9cBgoAPCRaXpCqz30EjIQpFnInpLa41vKB3ZAahW3aiMWzp/s= Received: from BL0PR01MB4226.prod.exchangelabs.com (2603:10b6:208:49::30) by DS7PR01MB7878.prod.exchangelabs.com (2603:10b6:8:81::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Fri, 29 Mar 2024 01:32:37 +0000 Received: from BL0PR01MB4226.prod.exchangelabs.com ([fe80::12be:916:b914:8b26]) by BL0PR01MB4226.prod.exchangelabs.com ([fe80::12be:916:b914:8b26%7]) with mapi id 15.20.7409.038; Fri, 29 Mar 2024 01:32:37 +0000 From: Ilkka Koskinen To: Robin Murphy , Will Deacon Cc: Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jing Zhang , Ilkka Koskinen Subject: [PATCH v3 0/2] Mesh PMU: Add tertiary match group support Date: Thu, 28 Mar 2024 18:32:13 -0700 Message-ID: <20240329013215.169345-1-ilkka@os.amperecomputing.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: CH0PR13CA0008.namprd13.prod.outlook.com (2603:10b6:610:b1::13) To BL0PR01MB4226.prod.exchangelabs.com (2603:10b6:208:49::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL0PR01MB4226:EE_|DS7PR01MB7878:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uxiXQt+RsCb5JApZOid1shaDyTg/rz0UN4AjFCJjQxCMuENcc1cH3+HZW28jQDOE9WG3dyHoHLvoU+igBE0oViEnva6LRX/WWldQi8ZvpT1iGIm4FNFCFL1EWzg7yQsbiWDMwZxGF4Nz+jx6FgpV0n6z6hCKuKFZndJnQScvfeM7XY2uiwEmr9ImB303mejs6miWVvptDa9RCsB7aJg9gC4C0JhzdBg1uejcJO8xCbqe1l5R7tkJvc2tIwwgMQ5sZpJfBASaqWDwC0IfVReeRrXbBQmJn1MUJL9VuZ6CBapvc2M8FOYh3j1Pg9vzaKDtEWE2IdCREMWCs6I9CV3wuEVA1G/2QA2USOgfoboc5LsHDNCuoWp11/jMGsg1uyD9ZCk4og2rhvexMSWtythA+hMEfZRq31ezjdrcoTQk9SpKhQYR8F7XuBTQFJ1aJ9Of3+JFlZ8rnDAaCkd11TV5wOeEU6y0cwznx3qXbT3ieIYbY8XF9c8c3pqg+nWZJujnqyAWP8WGaqvYB1W6JJmQcBFZIfhZ6HW0Ba9sssampynqxNB4W6CEmvfBLvxhPsOefc1JISEFSPbpttX0alKQ4LQKtuBIj6/UVHgE7tTfPzncjClpd2KALyPVVtTChiUNtp6p1rID/ShUF2gLl238sHBdOzEk5HvEmDwlI00Vq0k= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR01MB4226.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(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Wkn3NbiwfwW7tsgrdd19z4qHw3obSg8os4HcDZG08kKaWlRzNGxSPPvKZaJ+otkbppqKbQJwE9+tyXvHZtLOLM9TK4a180zQJWpqmpnJzE7y6Dg/H1rJWTOAV3sEM0a2gerUoOxDxNbMLrHOwvGj9RqOErrW7hXOoBA27daO+zrwWcn24ck1SIG6LBV+XqSTKR7C8ngrEXQP3lXOUTl4ttoMZF6Roe++ODVPuNk+7Ch8DKZ/jBJFaicpuhY+wYMENLn7u791zbvnguVOvPlwzE8MXR6A5Lw68rQFyKoorGyNhGhLLHEjEb/lvZ5M8NQV+UgJubeRQ+1fpo6Spv45huhjbfrfqnnZU6iJKxowm3Z9Qs5oueCHFZsVId2jsxQyxBqxbzn2U/YV9UgwKN0GuPIiF9l3CWKXcM/iNN2hQN/kgr2uZdXxCvZzx+s4i1MET/wcGf4A4+HDy8qnT/u2FTf2Vn60m9kcUf/Bk4BLamV8HrY3pZzinmjX29UX5+ts4JH8JyhHPL8Avt/ePJt2Z7J3lkobR9ubaMOyhhhnAyt51lG5SzrS64bv12yQ+C1f1PHbkUS5OaqPfZfhje4GUZZj1QoAIGw9kocLzoNAFeKi6aWq25Kf2Jq+xYjRMpgdoghqgIeaB+SxAlbpbMPvVsoBw= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8422be67-160c-44f1-6dad-08dc4f901dda X-MS-Exchange-CrossTenant-AuthSource: BL0PR01MB4226.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2024 01:32:37.6664 (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: UDi+LeZ2oPpQWF67AD15uujjSi0NtLMZM1r5A4QHQfFKP5SJsi3TBfmUeCurCXmiqEJISQNycLvaZjMDwBy4FCuDY96Ki0/zupf5oATSe15WFmEXgZtCXJD1/3dU9wgQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR01MB7878 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_183249_274858_6F8BEC18 X-CRM114-Status: UNSURE ( 9.20 ) 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 Hopefully, I got it this time and the patchset starts to look better now... v3: * Replaced wp_cfg in arm_cmn_hw_event with wp_idx that keeps track, whether the event uses 0 or 1 index for the given direction * Cleaned and simplified allocation/claiming of wp config * arm_cmn_val_add_event() can't and won't fail anymore * Separated wp_combine from wp[] in event validation phase * use memset()/sizeof() when clearing an event * Still kept wp config allocator in separate functions - at least for now v2: * Wp config registers are allocated on node basis, instead of using the same one globally * Use bitmap in the event structure to keep track on the wp config registers assigned to the specific event. * The bitmap tracks only either UP (wp conf 0&1) or DOWN (wp conf 2&3) registers. * Dropped the second patch ("The patch set v2 is now in the internal mailing list") as perf/sysfs doesn't really support items with the same name even if visibility would handle them. * Addressed a bunch of other comments by the author * https://lore.kernel.org/all/20240307230929.6233-2-ilkka@os.amperecomputing.com/ v1: * https://lore.kernel.org/all/20240126221215.1537377-1-ilkka@os.amperecomputing.com/ Ilkka Koskinen (2): perf/arm-cmn: Decouple wp_config registers from filter group number perf/arm-cmn: Enable support for tertiary match group drivers/perf/arm-cmn.c | 116 +++++++++++++++++++++++++++++++++-------- 1 file changed, 93 insertions(+), 23 deletions(-)