From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 469E31B6D0F for ; Fri, 13 Dec 2024 14:22:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734099726; cv=none; b=HdpcpqTwUhOWAJBpaa/L/Lhm988Mpq1x6AboFHNjflhCSMirFUIWNy1gBog7bm5LErIhl+sM6B4L0U0/Tf07fRk0dJ7Gcg+pTifSrA8vW8fWSinfM6rcxRf9ZT7rSwiuSokPRebOux/7nm0euxW3yIm+N6avWTGShDk1jqKsYXI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734099726; c=relaxed/simple; bh=KJpONkaBP/khlop01ndU0Ewf1OzhZb2rkyYSLu/wB50=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=bM70zNEsZH19h6hHhgPAWMdHVODNnwblCd7omZFpF1u7XJhDbinA2uquClaR1EbBfiWISfCnyKvQTyrorkU78PRB2khim8BZZAgMORcgcr5X4eRf3bbPnkaCFw4fcMe82NrHts73LschjvA7WBYFfx8e7pj/J4vxa56Ek3Bwkew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u1ZM7ROE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u1ZM7ROE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC920C4CED0; Fri, 13 Dec 2024 14:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734099725; bh=KJpONkaBP/khlop01ndU0Ewf1OzhZb2rkyYSLu/wB50=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=u1ZM7ROEOuGt0SniQWnsu4b6POLsLh5eSgv4Ed5JIzYxK5bqQb90H85SYKVKzMxD6 vJV7GuANEFLuywXU4ToQC4x2l85o+H0N5aesE3TDOr2VgQNcpp1Rq4midj8RCEraZ9 +pP9WLcVXZWbUGyUuvVUtWpILMNFAiE/f+osNVfwUYzeBeHRMUrYlhkqzZ9aM8hTYa h2LPnukMptIVEwa9gFpw2lu1r6suul7WtBrPywds37+NCujESI0ie0Buvtx8kCM/dP ldEQmEKUGKDuoAKkgI7yFKtyEMFcuqhtBryfgkG2AMc6SLe/RMMi03nvhRwsj8kPGq 7XyQ1Onk6WXwg== 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 1tM6YN-003SmE-IZ; Fri, 13 Dec 2024 14:22:03 +0000 Date: Fri, 13 Dec 2024 14:22:03 +0000 Message-ID: <86frmrslx0.wl-maz@kernel.org> From: Marc Zyngier To: Mark Kettenis Cc: richard.xnu.clark@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, linux@armlinux.org.uk, mark.rutland@arm.com, torvalds@linux-foundation.org Subject: Re: Question about interrupt prioriyt of ARM GICv3/4 In-Reply-To: <871pydxde2.fsf@bloch.sibelius.xs4all.nl> References: <86cyi5tanz.wl-maz@kernel.org> <86ldwlryzz.wl-maz@kernel.org> <871pydxde2.fsf@bloch.sibelius.xs4all.nl> 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.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: mark.kettenis@xs4all.nl, richard.xnu.clark@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, linux@armlinux.org.uk, mark.rutland@arm.com, torvalds@linux-foundation.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 12 Dec 2024 13:02:45 +0000, Mark Kettenis wrote: > > Based on my experience with OpenBSD, I'm not even sure there is much > benefit even if you have preemtion. > > And regarding anything wrong happening: there is an interesting bug in > the RK3399 GIC integration where it gets the priorities wrong: > > https://github.com/openbsd/src/blob/feb3ea439d8f49b3c0e33f54c34631a611b98e21/sys/arch/arm64/dev/agintc.c#L395 > > (that comment is my interpretation of what's happening; I might be > misinterpreting what's really going on) > > As far as I can tell the Linux code doesn't handle that quirk. > Probably it doesn't matter because Linux only uses the priority > mechanisms to implement pseudo-NMI functionality and/or doesn't do > preemption of interrupts. Ah, beautiful! We actually do preemption with pseudo-NMI, and as it turns out, I just had a report of 6.11 being broken on that SoC when pNMIs are enabled. My "solution" for this is to just disable security at the distributor level, and let things rip, see [1]. Thanks for the heads up! M. [1] https://lore.kernel.org/r/20241213141037.3995049-1-maz@kernel.org -- Without deviation from the norm, progress is not possible.