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 0B7E1C4332F for ; Wed, 9 Nov 2022 18:21:53 +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:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uQwiO5P5sKmL5du5Ar6kE8jocBGjiNU4jKdHq5Kqocc=; b=kUANFUNygexRoC ndJ116iOd42Q+0LJe+T5GlY6dHc+CUMXd103+/+orJHbUX8JGnGVrvS+73YPU6HtCi8UYx116r+h/ l9tHqOhuGCE84plfaxPt6Y7qyWoBo/hJKttKZmpgdsAfYzbnpn9Y/qYYNDhGxHHrFF4+RT5Av8xMT 88F4PlKruVzuoX6Ns1HD86ptajCQEs2CbPvC69xSIE5TyD8XLkke+jtBJmxL2Of24hKLgRUt1Vy0L pg29Rkb4EqRPLrdmFKMV5+fujOGUcTQxFWV2qZcEqu+xsqZOvbMUp+reTAZhPbFpV8lO1UUdcPnkv DWv28Sgze0S/eCORnEwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osph2-00G4C7-NU; Wed, 09 Nov 2022 18:20:56 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ospgz-00G49r-GN for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2022 18:20:55 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 24980B81F49; Wed, 9 Nov 2022 18:20:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C903EC433D7; Wed, 9 Nov 2022 18:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668018050; bh=f5WlHtCUdeO7PC5hRQWApPE/3DDUhlTy4X6KcKfHhRw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=q8tEza9EH03A9jm31HJ+DkmPpQ/zxCBOtWGbsvKF++IJQ7LfDuBwHHvcZahw1AfJa l4RkvQI/Y7D9iScCHGejKiI3z/OAWV2+T+DvpEUnHU6F6hDueaMTA0TzlrziC6Iliv xHMOQBscXmFvnlbB7R/6F63XR0fbski+pqCOnE01nTDi2BlXkrONvNmwJJ3KO33UiE ryHrdwkGxQ93COXutnPLtpNoNISqXRnYiNlgrjqn8mOh9ZzmvUQ1HyvWPgHcPRwNUn 0GNnqGKFZLjYzXMA9UHI0PbBXlQwauCnQLNp9c0ErKwj0DcNIqP4ZT1+TI2dOsnFSp JxA56lW2a1Xpg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ospgu-004ynk-I5; Wed, 09 Nov 2022 18:20:48 +0000 Date: Wed, 09 Nov 2022 18:20:48 +0000 Message-ID: <86tu38oupr.wl-maz@kernel.org> From: Marc Zyngier To: Mukesh Ojha Cc: , , , Thomas Gleixner , lkml Subject: Re: Query on handling some special Group0 interrupt in Linux In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: quic_mojha@quicinc.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_102053_855395_18F1514C X-CRM114-Status: GOOD ( 26.28 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 09 Nov 2022 16:20:35 +0000, Mukesh Ojha wrote: > > Hi, > > I was working on a use case where both el2/el3 are implemented and we > have a watchdog interrupt (SPI), which is used for detecting software > hangs and cause device reset; If that interrupt's current cpu affinity > is on a core, where interrupts are disabled, we won't be able to serve > it or if this interrupt comes on a core which has interrupt enabled, > calling panic() or with smp_send_stop(), we would not be able > to know the call stack of the other cores which is running with > interrupt disabled. > > I was thinking of configuring both a watchdog irq(SPI) and IPI_STOP > (SGI) or any reserve IPI as an FIQ. And from the watchdog irq handler, > I was thinking of calling panic() which eventually sends IPI_STOP(SGI > FIQ) to all the cores. And with this we will able to dump all the core > call stack. > > I am able to achieve this but wanted to know if this is acceptable to > the community to support/allow such use cases like above and enable > group0 interrupt from GIC for some special use cases. For a start, we only deal with Group-1 interrupts in Linux. Group-0 interrupts are for the firmware, and we really don't want to see them (this is consistent with your HW having EL3). We also mask IRQ and FIQ at the same time, so this is a non-starter. If you want to be able to deliver an interrupt while the interrupts are masked, what you are looking for is the NMI framework, for which you can register SPIs as (pseudo-)NMI. This is of course assuming that you're using GICv3. If you're using an older version of the architecture, we don't have a good solution for you, unfortunately. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel