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 A1398E7717F for ; Fri, 13 Dec 2024 14:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=edz4U5KA4LxSbE05Zp1vvj06l7AIHq3qL+yDSEhW3J0=; b=gmoYnK4joanIBziPxXyo2aVIib FyYTmLfF84Z78qFk8D6TzvwHfq+VSj/Kh9rsnF6/ucDadxBPN2RS3Pmkx8HRxHXRrmLp/l5TN9pD3 Husc+/iGumwF4u3BDRAWCUHM8XSjFY6YcArPub8gw3vtt+Xy+5pN1waqBP3mT0EEoAzAkj4hU80O3 tZjrtJdfbSOve/QxahnT0qoS5ze0jrrjP3q1MKRkTd3sG8TLZVnHDzDunuXTUtzLbQxE1iIqcI2WM gkHI0bdI9ceSm6l3HzbqpvxTt8fSz9fKrQmB/YpBRpTd0aU1/5rebhR7wDgZNSJCYuNFLeogJBA/r KrOvTPVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tM6lg-000000046xm-3fnK; Fri, 13 Dec 2024 14:35:48 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tM6YR-000000041Tw-05qF for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2024 14:22:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E90F5A42C0B; Fri, 13 Dec 2024 14:20:14 +0000 (UTC) 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241213_062207_131547_AF8E9D03 X-CRM114-Status: GOOD ( 19.05 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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.