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 79227C8303C for ; Tue, 8 Jul 2025 14:45:19 +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=4mx3IHteRwUNhYCrAfGMzhRUVTp6CPPr3df3PDyxl2k=; b=w7Fox52aYGzVRyyd8lYpIE7pPo B3p186UMqI0KIaZWmWmkgrGTMNb68aZmruPymvIA/3lCDdapMjXRLPR+Ih336tSQOHyiJAD8jkKNC 8HaOGG2PdTZ/L6TNNLSB7gSF/lV+SIa0YJkKrcXj4RfqBTROMV5a7jh3tojb+XhUdwsnR1tmK8AMa 2I0aDdb7YgpkRHgVCa5AbrZuHhoeCmSJ3NTBoeoN8ePgeNxAdzUbjmL7dsEF2m6dgoCEPcllea18g reMhRfj62cmthYFnQ7kGEZCCeCL8x9SjZmbJWBuWfG52ahQab48qSIYJ3j5Ax2VWve33eCa8B1LES O6b1yCVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uZ9ZH-00000005eBy-13kG; Tue, 08 Jul 2025 14:45:11 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uZ9VJ-00000005dOq-2np3 for linux-arm-kernel@lists.infradead.org; Tue, 08 Jul 2025 14:41:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id C5C48A53EC3; Tue, 8 Jul 2025 14:41:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F1B7C4CEED; Tue, 8 Jul 2025 14:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751985664; bh=o+9yZP3hCqGsyFTdJeQZPiXoMBkX1jh2XVuQmFEjmBI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HA6JFNMOMFSvn2pwCigUy0Hy8cnFK32vInmMDrgIIzlhCd4zadfHcN6+Jcm7X/kvw 8S+sBSDS8BV3X1rOegvUktfHECu8ZK1skJMC/+4rblRv1M1pABfs/uPAnF2h5RtcT5 j/79hXxWJjvioOtJkwD2voNruTz9xO94Ta15VpxCylYQZsLwyWBwSrUrNoqVh01u5H 2FWo51N4iUt08dHwHSLkR/p0T1YVaHL1VrpfGtGjprJYphd/6nnZ0mrfRKYBK/NX5c JRq2PUOPuhZqplXmik4V372bk5ioHztN3OuQxOomD/ku3/HBX0nSu4UWznA9p+i5qN E7+lTqimx1UyA== 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 1uZ9VG-00DnGo-3G; Tue, 08 Jul 2025 15:41:02 +0100 Date: Tue, 08 Jul 2025 15:41:01 +0100 Message-ID: <86qzyqagoy.wl-maz@kernel.org> From: Marc Zyngier To: Lorenzo Pieralisi Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Toan Le , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Thomas Gleixner Subject: Re: [PATCH 09/12] PCI: xgene-msi: Sanitise MSI allocation and affinity setting In-Reply-To: References: <20250628173005.445013-1-maz@kernel.org> <20250628173005.445013-10-maz@kernel.org> 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/30.1 (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: lpieralisi@kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, toan@os.amperecomputing.com, kwilczynski@kernel.org, mani@kernel.org, robh@kernel.org, bhelgaas@google.com, tglx@linutronix.de 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-20250708_074105_775091_7B27186F X-CRM114-Status: GOOD ( 21.29 ) 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 Mon, 07 Jul 2025 15:57:47 +0100, Lorenzo Pieralisi wrote: > > On Sat, Jun 28, 2025 at 06:30:02PM +0100, Marc Zyngier wrote: [...] > > + * Effectively, this amounts to: > > + * - hwirq[7]::cpu[2:0] is the target frame number > > + * - hwirq[6:4] is the register index in any given frame > > + * - hwirq[3:0] is the MSI data > > I think that adding macros to define these subfields shifts would simplify > reading and reviewing the code - while reviewing xgene_msi_isr() I > realized it is hard to understand where the shifts to pack/unpack hwirq come > from. I'd understand you don't want to use FIELD_PREP/GET on hwirq, it > is not a HW field but rather a SW encoding you created but at least defining > the shifts and using them throughout would help. I have no problem using FIELD_*() for that. I've now reworked this to make it clearer as well as added a bit more documentation on the behaviour of the MSInRx registers (they are quite funky). Thanks, M. -- Without deviation from the norm, progress is not possible.