From mboxrd@z Thu Jan 1 00:00:00 1970 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 9ADE8C67861 for ; Tue, 9 Apr 2024 01:08: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:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:In-Reply-To: Subject:cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3In7f7Kc+c1u0b96NsImatw/trn08PVpI4H1SM8A+Ns=; b=gksctd5qaIwiusdreXv3BC/A6d /aIwfUl1z5CPoaQyPof13ZSFq5os/LllijzovHqK+ODhJVnPd/OubQjb1Phy+zcgYmmNalJoYaHeX 954WYFnH0UaWh8jamhWxrEurTDDyy/sQ3rVCjyo6+UruVG4HH0OhhvJVVN9Efpx/2PGffVv/B10Yf 0ZtQsGR+PlSltw+barIrwfxnolIotjzdSRGgtgu1pgX0syKckicCVsKvKX57UreyimNAvGsPA4amu SkkqRc7VMApZ//lKeUMlAw/k7xtKZ3hQAz1PXMNp0cHTiLrXDbRh63ihrhBukLYL0UNFEf2wX8zE2 iLzuy1Qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtzy1-0000000HLjQ-2yUA; Tue, 09 Apr 2024 01:08:05 +0000 Received: from mail-mw2nam12on20701.outbound.protection.outlook.com ([2a01:111:f403:200a::701] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtzxz-0000000HLid-0Ng8 for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2024 01:08:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YIHScsij64bTvz57VTlEWbi4TZuvka9QXoNTNp8yywAy2ibVXHo/2naRJEINLO41toB6+jqYihAxzrIsWkLPtEySXkuUYBUu++VftiQQej80ZN5wu6vL2SRZJpXc+1kFd9UyAwjRIqKpuW8fxM7mkvRze4JbXtp/eevjMmoOtTpKqcY8E8p558b0FH27Fhf5vqTaKtNOGgjq3Bnd/GCvGtzJ4kC3Gokzr1r2kJgPFS+HQcjx8mO0hWgJtnKNpoesS1p6PQmhUFeg8wiSpVoga+YVkBQ2oV204VXbsYuQCngsdq9qsmXxtdIKKwIH7r1BgZCkPwpwGdtzvZE1QO92aA== 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=9RgdZEIX9OYQcLLh/b9F7moNh8nL1qwMsQACgykhDcQ=; b=bKa2trcfsGLNfI26U/os6DmEoiolYvpiSEu+oM7wjEvZfH1fHkEnjj3HzqEDbnhWPQF63Ja0t/VpS6/c/Io/aqIc8HR28omt1A9IlErbtgDOZVuP+36SbJhl4Ziz5+MIzWm3RIJAPWKYUkzLsJX/7haO3IxlZtvCrnbHonFK4+nfuSZyLTd/+cdj8DjjEXoj2lplTpKt1ENcvByT3aY2NaHjApKotcHzy1M5my4S5x7xXLH78B7FZnihjP2nnhOvfC+n9uCRQGfR7adk/1+t+vmh/bY6NfXvPeehsaQpuhlhwP99o3KvxXqVMIkaj4WAenacwgJWIhLj0+PvTd2UDQ== 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=9RgdZEIX9OYQcLLh/b9F7moNh8nL1qwMsQACgykhDcQ=; b=jtFaQFux9ZX1ZoI7fbNdhr8bSx2Xvnq3nGPBSDJzWE/fRXrKX2s4PixBczIJLXQ3gNfqhCQcCINaYEfOsx4jS1YsFmEFhOYG7b9CXBDnumEbzIjCi5vpDCDjqv6DJlC6Ectgo86jRsEXDIahEAVwfwr5JuAPGBuDk9NWB05kmDY= Received: from BL0PR01MB4226.prod.exchangelabs.com (2603:10b6:208:49::30) by BL3PR01MB7097.prod.exchangelabs.com (2603:10b6:208:34c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Tue, 9 Apr 2024 01:07:51 +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.042; Tue, 9 Apr 2024 01:07:51 +0000 Date: Mon, 8 Apr 2024 18:05:11 -0700 (PDT) From: Ilkka Koskinen To: Robin Murphy cc: Ilkka Koskinen , Besar Wicaksono , Suzuki K Poulose , Will Deacon , Mark Rutland , Raag Jadav , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf: arm_cspmu: Don't touch interrupt registers if no interrupt was assigned In-Reply-To: Message-ID: <8fdfceb2-90b3-a1a9-fa88-a45ece30c0bb@os.amperecomputing.com> References: <20240307193104.58302-1-ilkka@os.amperecomputing.com> <042bbb32-481e-40d8-a46a-472b724ec33f@arm.com> <89d7ff41-ce2a-fd95-ebfc-4df914efd4c8@os.amperecomputing.com> X-ClientProxiedBy: CH0PR04CA0058.namprd04.prod.outlook.com (2603:10b6:610:77::33) To BL0PR01MB4226.prod.exchangelabs.com (2603:10b6:208:49::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL0PR01MB4226:EE_|BL3PR01MB7097:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +gvBsJ55ZEM3u361NZBfVjYmr5s4La07yITD4OMMNby/OvoqChXBEbrgZLFeXgeN8RyBw4hJTq2n+UOtaPl5v0h4w4QK2YF41W0zfRwRbGC4TnH/3Yp4EDfaiW0DNnArYw7k7icNSl41aOem6KMNuRQhfsc9SguLQOv/IQ4bINwcdPN/dk5xIPDTZI+kk5rdKiQGq7+HB4nERFxjv4+N5yiWDqFyA3KTXmJmv2lo0+7zBxcYNpH3NVZ+kEx6+h11F7dZ244+wVH9j5u8e3HVLmVUmMC9NghDeCPWmi4VY5IAx+6TsN5RwBOCqzh2b3S2M3o1KcICiH6sh7K1z2L6iJzanlVkqyn36wBI+h2PS35+bzBIxBZM5fx3blW3I0TfB21qFHJ4iE8/VKarcdXTo2/D1IlFuMxSE4txi8nv7wPKpMZxmOopQqgdWI9oAzD7w4TRS9M1opp2M99gcWQnrbwaIg5rsqQccRzT3vojusnmsK5PIO3xMWLP199pTXwltOO0evHt0IMJZII4wBuYrSLA3iU/f2eS8YOIjn9WhgQNamrE2Tl8VfqPM9JfN4XhGWLOyHrF+xQQ3mEFh+Ool7wDEwX3xkO3o8HkMLhf/xl3zuZ8yGRTMpkt/RZh7o2K/QfES3ZqttlLGbE2rx4rvXyEPExUFR+MuRc7zPMYuUdovo/9MdrjPUmdZJLyLsyg4p7IgeTT/bMbJo6/cAByT/uoyzuzI8oh/dgTtFy2/S4= 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)(52116005)(376005)(1800799015)(366007)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?M6Sa5ivnL7Iv123yk2mm5nhz2xtiLxZtTzdC1B9JdCNdGquC9+cQIst2ZRhN?= =?us-ascii?Q?YyPWLTkjgdgPUbaMvr7pQVi8LVdBuEM2tSI5hyQfQfrmOlmetbHqpd3hAYdp?= =?us-ascii?Q?MSdUfhNN+RIWO8mrI5PztMFGiWmenvaj6C+3+vRkKlgJrxMAc1qoHkm0NPIY?= =?us-ascii?Q?34l0Evkentrns05EKojabmHiStqLzWKkaCW10fcClajtDPDzxtV8bE5XWDsW?= =?us-ascii?Q?VNtj2moLbq4r4UOTGH5XJOjEboF6sbY0HRvmLuXKfJMIp5g2lhwciW3gf6Q4?= =?us-ascii?Q?XuT3gJ7k0U6c+cDJCjc9uMbRElnPDz94qCm5/QYmET/HejjrxkXjXYUNpIb0?= =?us-ascii?Q?9/QKjJ2YZjUxaCW7Xa8+Z/M/E3Ydn/jx6vo8H7LOzU9DRCJ49/hHh/iXd5Qs?= =?us-ascii?Q?DWIgpBkgKeJTf20BhGEWvXsfWV46GnkiRfk2ciMTzwAeCu2EquH//UB5fxcf?= =?us-ascii?Q?BnpMffYItBi/e3U2ZoBeLpjoTkOUIsFJHIJ4un6qu0Z5tQe1SzJPnrcvd0LI?= =?us-ascii?Q?QwNQAYOAqTB1rlg1GjxQ9F90LmIXzYjTkwfH37muauOeTqBure2f1Sq91xJq?= =?us-ascii?Q?5iCmrHU1yb5VvQ15A5Np6hi8vJThBpCEGS0Ru+7HnQ3aiABQDp2N6cbA6xxH?= =?us-ascii?Q?ZM39LI05PSojE+D/32DJfJDxO18V4DeH+3BMBgGMtNK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iBa+8eARzzCIlmGu56yzjxbHMhCmqKgK/8CQEzvf3qeu50?= =?us-ascii?Q?YYwtHuor2v0NmT7HcVpWBTo=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19bee514-562c-4e41-ab4f-08dc58317a88 X-MS-Exchange-CrossTenant-AuthSource: BL0PR01MB4226.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2024 01:07:51.3313 (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: qmo4co6KoHH9ztIy+f0VixdnvJkUKFR7l506a3SHlIDPP5Fsvk5C6X+e1BIaFk5fA2mMUMhUEgH7Pl5AvIhEiwcMgSypZMFAQQLVCiWDFnv1BiBLksUuM1XpXGFBGGNN X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR01MB7097 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240408_180803_175784_7E170F2C X-CRM114-Status: GOOD ( 16.63 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 8 Apr 2024, Robin Murphy wrote: > On 2024-04-05 11:33 pm, Ilkka Koskinen wrote: >> >> On Fri, 5 Apr 2024, Robin Murphy wrote: >>> On 2024-03-07 7:31 pm, Ilkka Koskinen wrote: >>>> The driver enabled and disabled interrupts even if no interrupt was >>>> assigned to the device. >>> >>> Why's that a concern - if the interrupt isn't routed anywhere, surely it >>> makes no difference what happens at the source end? >> >> The issue is that we have two PMUs attached to the same interrupt line. >> Unfortunately, I just don't seem to find time to add support for shared >> interrupts to the cspmu driver. Meanwhile, I assigned the interrupt to one >> of the PMUs while the other one has zero in the APMT table. > > I suspected something like that ;) > >> Without the patch, I can trigger "ghost interrupt" in the latter PMU. > > An occasional spurious interrupt should be no big deal. If it ends up as a > screaming spurious interrupt because we never handle the overflow condition > on the "other" PMU, then what matters most is that we never handle the > overflow, thus the "other" PMU is still useless since you can't assume the > user is going to read it frequently enough to avoid losing information and > getting nonsense counts back. So this hack really isn't a viable solution for > anything. IIRC, what happens is that kernel will disable the interrupt eventually due to unhandled spurious interrupts making the "working" PMU also useless. Cheers, Ilkka > > Thanks, > Robin. > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel