Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1827014rwd; Fri, 2 Jun 2023 00:11:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4X4A8v+wtMcd0dTJki4d7UA9E0hlbR4qefwapv+Kpth5XtYzI5XBdSvQUGl6hXfBds4dqt X-Received: by 2002:a17:903:22cb:b0:1b0:bf80:d1f2 with SMTP id y11-20020a17090322cb00b001b0bf80d1f2mr1920130plg.49.1685689898990; Fri, 02 Jun 2023 00:11:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685689898; cv=pass; d=google.com; s=arc-20160816; b=RF+IE2bmuTNv/qnouPbJYqVvYjQvymAEkv0UpSruWcoJYXryo0IbqmfgUfaXQ7iJXq guqcuvaTBsy+xXBSeyu5rfKr0ElZ+tWBD3fLrtwGmf9s/9Y+kfcTlrQDvsh5PfXkWOxp KpuXlfV6Enrr9GD86wjEzJmp6EOjBPQK1HBa7JI7j/pVF3T3kfRX1GBqi8gTY/GHNjg+ QWkuxuBYyPvYXSeeVHOfWrtBqiTJkv6MkyA+ygKQTxL27/Ekh7r2ZcrOiW4x30IAXSMb y77+pn6P+ceiSJRfRyvEVlm2pvjxy/NGzIBb9nG4n9V7kN6bt8B+vdEbV8dJ/AQH+eFy 0FcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=B3Xv7N78wJJF8v05BSpHgkG+s4731CZUi2PU4as4Yi0=; b=xoD/Ce9xfBGjRfzlKSSDtZC+MBnZbXN0P9WBV8OtOTuYAIfG5DmYkRBm9FnK5XKJb0 rsh7RC2rRqcbmlaQ42YiuSD5QH/7Dy+wOVUi8xnLJ65t9gU6QNRyGOPugOPFwnDpKU6s 8TI33Iw/7NthsVhPaAQDk7/eS+UucblAqvRKLS00EfEehrqYnmQhKJDSERL+f0lOmUIP K1YdCtgDea8Umlob3BH+laISGRF2CBSkm/chkwa7ps1aieHPnOHZJxS1BkYI8R+xVhIe h/BW8wDcn4HYfdD+pKbAzFiStoCCrWV3MWW8LiQ01mh6HGSL5xg4l6J2saKHBAqoAyUz vpFA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=BmuHOHgh; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz1-20020a170902ef8100b001b008b3dedasi402189plb.579.2023.06.02.00.11.25; Fri, 02 Jun 2023 00:11:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=BmuHOHgh; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234189AbjFBHFw (ORCPT + 99 others); Fri, 2 Jun 2023 03:05:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234184AbjFBHFO (ORCPT ); Fri, 2 Jun 2023 03:05:14 -0400 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2113.outbound.protection.outlook.com [40.107.96.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44056E61; Fri, 2 Jun 2023 00:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GV6Wxza10V+FXzXIJmO0EkWsx1l2opDoWHW5WGXpU31/xD03DjeoIlHRtlkFZzUFDTgK6a5YVTtObOPKGgULkVxOkhLHFxwy9OAcAn7hoirJY/loPQ7g6pMdnr6ytftEFDVCmZhOgnxc7IGpzSl/LBHE+fRfzheMJy2c0/69kid/UoYjgQLjWJYimpAAYjbjL5DEbYuPu8BStmbYfjM7hRNTXJh2sbGw8YEdh7Lqz3mkgRLmVSPqQ7szqwE+0UbtsZ2wNO6TV/hLdxDQ8jJBRUFvedx3G87Fw0E32tbJNznzQhnzEkoC1okrwmQM0cC3x03pno0+ef//WRw8deemSA== 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=B3Xv7N78wJJF8v05BSpHgkG+s4731CZUi2PU4as4Yi0=; b=e5mXrs2xWvkJgnCkZXJ8SdtfCNW+2Q13WgLNdtGHQxjxAfKd0BJllG0enBy36r2Rn9NgcSYikq5BlEgDyuCvtw0vV3MJGAzZaV9vdY3KClEBKcMipMmzuzP24TUku/6EQEKC2/f13KaBDXjA4x7zg3MIN6qhJTZDQSFz/0L9to/tFVCHn7BXFf+NdMDSAgVAH5OpH13XMiz4ZlZ/RMF4ZQK2scf66iJ867kVIbEF5PQ3Eka4HpIkq90hSlBL7BqnBfSPtqdbwjB474SKGVMHebkbYupZZ0zyMwb/40HIa80NWJIBLlu9j6MZ/1t0MilwqnFEPsdiFxK7sDL0La8QQg== 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=B3Xv7N78wJJF8v05BSpHgkG+s4731CZUi2PU4as4Yi0=; b=BmuHOHghwuOI2+uZuqh+zB31N015R8YpCzVSOwym30sgRVTVpr5ZXvKmVStFzTXei83zpIUWPhzph2BEL6YL5odGc3Q9H67icZm831GJnoQN4IXuqbaUj5z443GA6HiZJgIIVKV6m1wThwUr5Bd1pjHjkEWFqSzcE0bsSpgAaE4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) by PH7PR01MB7581.prod.exchangelabs.com (2603:10b6:510:1e0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Fri, 2 Jun 2023 07:04:48 +0000 Received: from DM5PR0102MB3590.prod.exchangelabs.com ([fe80::5aae:2a5e:15f5:8196]) by DM5PR0102MB3590.prod.exchangelabs.com ([fe80::5aae:2a5e:15f5:8196%2]) with mapi id 15.20.6433.022; Fri, 2 Jun 2023 07:04:48 +0000 Date: Fri, 2 Jun 2023 00:04:42 -0700 (PDT) From: Ilkka Koskinen To: Robin Murphy cc: Ilkka Koskinen , Jonathan Corbet , Will Deacon , Mark Rutland , Besar Wicaksono , Suzuki K Poulose , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/5] perf: arm_cspmu: Support shared interrupts In-Reply-To: Message-ID: <77b19b2d-a84e-eb13-db38-78cb34a444a8@os.amperecomputing.com> References: <20230601030144.3458136-1-ilkka@os.amperecomputing.com> <20230601030144.3458136-3-ilkka@os.amperecomputing.com> Content-Type: text/plain; charset=US-ASCII; format=flowed X-ClientProxiedBy: CH0PR08CA0003.namprd08.prod.outlook.com (2603:10b6:610:33::8) To DM5PR0102MB3590.prod.exchangelabs.com (2603:10b6:4:a4::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR0102MB3590:EE_|PH7PR01MB7581:EE_ X-MS-Office365-Filtering-Correlation-Id: 93ef8539-d417-43c2-888a-08db6337a70a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FqZQsBWpBLgPuY26fXu9GoOZ0vpPGuRhuNantwMVaufoeBjrL1w6WOwh/SVunnck1ae8h9nw2HJn7e7FRyE94m8pd3Z72/ECdcjmBeNXyu+FwEYqYm1iZSU505EkB0T/YBZOF4jMrG+6mYBtRqBqppdTT9mhuVR2YM7j41s9J7Xz2wkF6/dcClMdtiEyt6RPOVWGx4Ib47TPo8hwng2LmG1XDavVQ12iRFtdJ9nFBP6yyIoC8dAsdaSok5Jr73tW99HyiweQMXAnQDiPw3UCssSvIgRAzOtSt205TlDH8VkGMY9OaANFN1zj/dtwgfgrIf9R9t3vPCIeCwcbUhM9zwsMseL9+1RK2Z+ktLzx8ZhT6uONrLNNk9/zRmlxuk9CxsGUvzyhaRtqtf88nJA7s6BhUZpAgpLsHOJwf+Qmxk4kpQGiOnzAjMOUJZad/ME/deC562qqbR3MetsIFRnRQJDx5ioVrOg3uuiZna/hXmZtedXjy5my53ZLL5cn1NXCp2zDsxnei7v+hnPX9AjlW9PMaDwEyM+yeQ9qZuBGa9MABn0c2lFXrXib2jSI6ZG90mlwcSVuF6oVDcSKOyr0EQ5O0tK2nhid08ZjX1EISQyCTwfS0fP2D/WHKVoMCnk8 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR0102MB3590.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39850400004)(136003)(396003)(366004)(376002)(346002)(451199021)(54906003)(478600001)(66556008)(8936002)(5660300002)(8676002)(66946007)(86362001)(31696002)(2906002)(6916009)(66476007)(316002)(4326008)(38100700002)(41300700001)(6512007)(186003)(6506007)(26005)(53546011)(52116002)(83380400001)(6486002)(38350700002)(6666004)(31686004)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?g7kyQ7Q8MU8BDySZWEzr9EvY05E+PIw78sGSWAJaWVvl8i/mJXL6tvezf5rq?= =?us-ascii?Q?ZIMZ2Ettx7IXIl/8trvC5Y4q2rz5+/VaDC9FCkGPxpKsqcim9OeO5PNzyUsl?= =?us-ascii?Q?nutZRwuyQWH34GMLPtGfP7pWHgo2LqlKqfjGoiKSbNJlwTs5U6piFnLX4quk?= =?us-ascii?Q?zc7XdJEqpJo08ys2lWpoVl6jHZmhNnf6BI7/1q+XXf8UKvHBFf9Y3iofjXu6?= =?us-ascii?Q?6jammOnQYDDH4mx5FhVPg0+RXCKZAkLrvzmyTk87+lVkdKIkTagqxUtHUkSo?= =?us-ascii?Q?/SYqx8i5qHnXXME1Jv0gMlY0eaE7LGPJVtl/utoCJdHWPkDxuPZZPOHUAy5Q?= =?us-ascii?Q?mYYRVf0Jro5OLCu2TK6lHwXwh9yWWrgdE7qztiC7utdGgVtWMgmmpf4PtU6k?= =?us-ascii?Q?qBkKWNYEWsUrHpxugcvnww4TUyLPDKGgXFNgEhc/rAC+IpQHpRNzRzePJlGO?= =?us-ascii?Q?PAqxcM3oJXQ10jiPhdy0tT4r6vqEIycM8wKsT22qLU6SCPLIqzg1UdqkBePn?= =?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0bamkNGkLvx25y9CnMgwcNeSVbxTI9?= =?us-ascii?Q?1Fb1UCujujMgt0rHPfPY5YnIGCTfdVCTMjo/3KG/e73SINbfu2AoEMv5AJ74?= =?us-ascii?Q?0w6//UmPV9hRUbtkjPYy/7GBg/Ys2GybTe9DEH/tkHKdWtKpO9Q+LUfJR2eR?= =?us-ascii?Q?w/kTNDFIPsOkBHyrcTxe4te6JOKRKIXFtNBhoRip0ahAHc/H/NW5fD0KB/dw?= =?us-ascii?Q?/azXgrtW0mJKBLQJIRlCbu0=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93ef8539-d417-43c2-888a-08db6337a70a X-MS-Exchange-CrossTenant-AuthSource: DM5PR0102MB3590.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 07:04:48.1202 (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: fY53U4+BAZDOgitZLoAkIYXXGAY+O/qHIh//7rBki+lzKFOLGv0TAEvpQidvGfWmlMoaqoNxdCHReVnr0cSGyJfCq5/qTBg9h3NeetV5UwWEwOOjhexJTBXmZqMOMupM X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR01MB7581 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robin, On Thu, 1 Jun 2023, Robin Murphy wrote: > On 2023-06-01 04:01, Ilkka Koskinen wrote: >> Some of the PMUs may share the interrupt. Support them by >> setting IRQF_SHARED > > This has the usual problem of allowing any PMU instance to move the IRQ > affinity to a different CPU without also migrating all the other PMU > contexts, and thus breaking perf core's assumptions of mutual exclusion. I see, I wasn't aware of such an assumption. Sounds like there isn't necessarily an easy and clean solution for the shared interrupt case. I drop the patch and get back on the issue if we come up with something reasonable later. Cheers, Ilkka > > Thanks, > Robin. > >> Signed-off-by: Ilkka Koskinen >> --- >> drivers/perf/arm_cspmu/arm_cspmu.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c >> b/drivers/perf/arm_cspmu/arm_cspmu.c >> index 88547a2b73e6..cc5204d1b5fb 100644 >> --- a/drivers/perf/arm_cspmu/arm_cspmu.c >> +++ b/drivers/perf/arm_cspmu/arm_cspmu.c >> @@ -1067,8 +1067,8 @@ static int arm_cspmu_request_irq(struct arm_cspmu >> *cspmu) >> return irq; >> ret = devm_request_irq(dev, irq, arm_cspmu_handle_irq, >> - IRQF_NOBALANCING | IRQF_NO_THREAD, >> dev_name(dev), >> - cspmu); >> + IRQF_NOBALANCING | IRQF_NO_THREAD | >> IRQF_SHARED, >> + dev_name(dev), cspmu); >> if (ret) { >> dev_err(dev, "Could not request IRQ %d\n", irq); >> return ret; >