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 599BEC43217 for ; Thu, 24 Nov 2022 13:40:12 +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=jVZrAXuL0J8klUzbcXAmu+aPamF94LggL67cNWJ7vBU=; b=PCrHRgCIgCNnNd DdUCNES0+dku16xpxLFm0VUEXPLgrEAH+2V3d8iY3vuHUHEIUxe9ue0B5B66sa5S98VfQm4ppmUt5 iuVetPgWWIEsECDblhZBi2VAmoB+Cbg/STtBAWB2Ef3dzWWOKzyF30+6rtBqW8U7/o8dOwlrV5bwo KAsLaVJJpkXv9rDOT4FyTYuE2U0KzqKuBRsaAxMr85H5FJ3WWZOqAN5G65DjaobWtzQKGOF7ek2nu 1+TkOtMkNCj++pqzvzu4DrVGkYH6DuxnMVCKCAaDoafPMchfLI2TDIWDia2o4+RlKgD7U+uN0Ab91 fwk6thDe7m+uDiPShgIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyCRU-008s1w-Kd; Thu, 24 Nov 2022 13:39:04 +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 1oyCRP-008ryj-Nv for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2022 13:39:01 +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 007FBB826DF; Thu, 24 Nov 2022 13:38:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC49AC433D6; Thu, 24 Nov 2022 13:38:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669297136; bh=7Au/HDQUhNqjxPT9EIdVuLBQ7xa+X0OeJzBexjpcgvM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dw9Qt14PDNMG2cdC0+PZTRsjYtl/WNvN7HhmltKxOZH1F06zFPNy2R6vPPL2vZnRP fbu9KbF8aBm/uu87+jWfPdJkCg+BQQ0k5E7NG+1yJJZwK7BDRh0k3aRXFJ3/N2YNOy 6DF3KXDeKm3C37I+0+R5r0DJGKr7jdO4Zyow4HpE6qvpq7JEfF0yiU4tIP6EQ7SoPW Pb7LjYV7EiSj1lgsxnexhXBQomC8IfeNUUFy0LHR4RVLrmqU1hReNPYCpqfLgocZdj Lr40RA/zlu5rwkacsmJw3pihB3Esop5PZ41PLMIcfMMwLWv8ZEv/4BRAB/jAhkxfki 8JFJJMoC0nwSA== 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 1oyCRK-008Ntt-J2; Thu, 24 Nov 2022 13:38:54 +0000 Date: Thu, 24 Nov 2022 13:38:54 +0000 Message-ID: <86zgcgmpzl.wl-maz@kernel.org> From: Marc Zyngier To: Thomas Gleixner Cc: LKML , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Greg Kroah-Hartman , Jason Gunthorpe , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ammar Faizi , Robin Murphy , Lorenzo Pieralisi , Nishanth Menon , Tero Kristo , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Vinod Koul , Sinan Kaya , Andy Gross , Bjorn Andersson , Mark Rutland , Shameerali Kolothum Thodi , Zenghui Yu , Shawn Guo , Sascha Hauer , Fabio Estevam Subject: Re: [patch V2 06/40] PCI/MSI: Provide static key for parent mask/unmask In-Reply-To: <87bkowcx0z.ffs@tglx> References: <20221121135653.208611233@linutronix.de> <20221121140048.659849460@linutronix.de> <8635a8o65q.wl-maz@kernel.org> <87bkowcx0z.ffs@tglx> 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: tglx@linutronix.de, linux-kernel@vger.kernel.org, will@kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com, lorenzo.pieralisi@arm.com, gregkh@linuxfoundation.org, jgg@mellanox.com, andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, ammarfaizi2@gnuweeb.org, robin.murphy@arm.com, lpieralisi@kernel.org, nm@ti.com, kristo@kernel.org, ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org, vkoul@kernel.org, okaya@kernel.org, agross@kernel.org, andersson@kernel.org, mark.rutland@arm.com, shameerali.kolothum.thodi@huawei.com, yuzenghui@huawei.com, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com 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-20221124_053900_150681_35D999BC X-CRM114-Status: GOOD ( 31.32 ) 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 Thu, 24 Nov 2022 13:17:00 +0000, Thomas Gleixner wrote: > > On Thu, Nov 24 2022 at 13:04, Marc Zyngier wrote: > > On Mon, 21 Nov 2022 14:39:36 +0000, > >> static void pci_mask_msi(struct irq_data *data) > >> { > >> struct msi_desc *desc = irq_data_get_msi_desc(data); > >> > >> pci_msi_mask(desc, BIT(data->irq - desc->irq)); > >> + cond_mask_parent(data); > > > > I find this a bit odd. If anything, I'd rather drop the masking at the > > PCI level and keep it local to the interrupt controller, because this > > is likely to be more universal than the equivalent PCI operation > > (think multi-MSI, for example, which cannot masks individual MSIs). > > > > Another thing is that the static key is a global state. Nothing says > > that masking one way or the other is a universal thing, specially when > > you have multiple interrupt controllers dealing with MSIs in different > > ways. For example, GICv3 can use both the ITS and the GICv3-MBI frame > > at the same time for different PCI RC. OK, they happen to deal with > > MSIs in the same way, but you hopefully get my point. > > I'm fine with dropping that. I did this because basically all of the > various ARM PCI/MSI domain implementation have a copy of the same > functions. Some of them have pointlessly the wrong order because copy & > pasta is so wonderful.... > > So the alternative solution is to provide _ONE_ set of correct callbacks > and let the domain initialization code override the irq chip callbacks > of the default PCI/MSI template. If the various irqchips can tell the core code whether they want things to be masked at the PCI level or at the irqchip level, this would be a move in the right direction. For the GIC, I'd definitely want things masked locally. What I'd like to get rid off is the double masking, as I agree it is on the "pretty dumb" side of things. 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