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 8C14AC4332F for ; Tue, 7 Nov 2023 15:57:35 +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=bCnI0B370cp+BqRFKkTTzfFL4T5nFQ1JwMQF/9O5frI=; b=bHPgbde23du/5j HqrkL4NKEZAdpK/0nUS2kS+lOIml1BAbUW8ybJHjIl1D/E2XwmObRvyTqRQ3dLJjVQzMdjTWryAbO PXJCUauf5XcXEFSLKM8Cx7CdBKypu4hoiR8wbLFjqH+1ggvXKKWdq/PBq2Ba2TyTjGxoi/n5+2W/g lgiFcfVpPasrO+AuIwVgCZjHDyFg71xFnw3Y/X4t9XYI38duISSICJqKNm0uJR7f0Sq950X1F+ZYa d/hL6Q6IQS7oMnQkm4J02tzf73e7zXZRSPPy2Pjzal0zmZ4fU3/j346KzRojIxSdjZsNk4w1GwAkZ AGqCrI/M1LIszt0q2P9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0OS1-001w39-1x; Tue, 07 Nov 2023 15:57:13 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0ORy-001w1r-1g; Tue, 07 Nov 2023 15:57:12 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 35B4BB81618; Tue, 7 Nov 2023 15:57:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 818CFC433C9; Tue, 7 Nov 2023 15:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699372628; bh=JY60Lx5ZvGXboVH+s2MR9Ye3RuI2c9Q7hwNs+uhiPf8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HsvPjn9rl1D3gxOxWU03YB+Z9Qf3ye5PKtE6TceSmX6XNY3pNr1shquC3d2iQruKS kdYX6dpSGkhCXjpEq55veRve1ASe1wmGf7eK3tac+xg9KRDfJiPm/4P6mvB0SI2xfp fivSC0dZFyqthKJ57w7+fRSH6+toerlJdK87mygd2zI0mpb8nohhnkXceBj2e/buW3 x1OOBXQ+wmVaZOGR9Vh5MuZbMwXr8kPC6jvcppNS7TWvbMI0pk8jE/ttrW5F+jNfIE dfd6L54sJx1UPByyupwP7WFTWiXImpw8L0ajrOiSzDRhJ15oP6n78/W1q/6Tdy2WVx t5po7FMeN29iw== 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 1r0ORt-00BB5G-Ri; Tue, 07 Nov 2023 15:57:06 +0000 Date: Tue, 07 Nov 2023 15:57:05 +0000 Message-ID: <86cywl1rqm.wl-maz@kernel.org> From: Marc Zyngier To: Douglas Anderson Cc: Mark Rutland , Catalin Marinas , Will Deacon , Chen-Yu Tsai , Amit Daniel Kachhap , AngeloGioacchino Del Regno , James Morse , Joey Gouly , Mark Brown , Matthias Brugger , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2 1/2] arm64: Move Mediatek GIC quirk handling from irqchip to core In-Reply-To: <20231107072651.v2.1.Ide945748593cffd8ff0feb9ae22b795935b944d6@changeid> References: <20231107072651.v2.1.Ide945748593cffd8ff0feb9ae22b795935b944d6@changeid> 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/29.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: dianders@chromium.org, mark.rutland@arm.com, catalin.marinas@arm.com, will@kernel.org, wenst@chromium.org, amit.kachhap@arm.com, angelogioacchino.delregno@collabora.com, james.morse@arm.com, joey.gouly@arm.com, broonie@kernel.org, matthias.bgg@gmail.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.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-20231107_075710_832195_4F0EA299 X-CRM114-Status: GOOD ( 24.91 ) 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 Tue, 07 Nov 2023 15:26:56 +0000, Douglas Anderson wrote: > > In commit 44bd78dd2b88 ("irqchip/gic-v3: Disable pseudo NMIs on > Mediatek devices w/ firmware issues") we added a method for detecting > Mediatek devices with broken firmware and disabled pseudo-NMI. While > that worked, it didn't address the problem at a deep enough level. > > The fundamental issue with this broken firmware is that it's not > saving and restoring several important GICR registers. The current > list is believed to be: > * GICR_NUM_IPRIORITYR > * GICR_CTLR > * GICR_ISPENDR0 > * GICR_ISACTIVER0 > * GICR_NSACR > > Pseudo-NMI didn't work because it was the only thing (currently) in > the kernel that relied on the broken registers, so forcing pseudo-NMI > off was an effective fix. However, it could be observed that calling > system_uses_irq_prio_masking() on these systems still returned > "true". That caused confusion and led to the need for > commit a07a59415217 ("arm64: smp: avoid NMI IPIs with broken MediaTek > FW"). It's worried that the incorrect value returned by > system_uses_irq_prio_masking() on these systems will continue to > confuse future developers. > > Let's fix the issue a little more completely by disabling IRQ > priorities at a deeper level in the kernel. Once we do this we can > revert some of the other bits of code dealing with this quirk. > > This includes a partial revert of commit 44bd78dd2b88 > ("irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware > issues"). This isn't a full revert because it leaves some of the > changes to the "quirks" structure around in case future code needs it. > > Suggested-by: Mark Rutland > Signed-off-by: Douglas Anderson Acked-by: Marc Zyngier 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