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 9F294C433EF for ; Thu, 24 Feb 2022 17:43: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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PvBLwdp5egFtQj7D/KcencDilKu+fm5ulVHnhsQ9fko=; b=GMZf5//S8pswBwmnlMP090/xr0 tkAizwaVV236/Da9gblaDRfCTJfEMZ6Lb6G+awm5SXxp4Zq+1Eo2+8a4ZhTuR33B+OEBCdGOIHZOT rXAkhyChtzCC3IgM8SqMLyVK1n5dA5J/cqfelfPD4zWpK/GWvTbFgkQJ0KISsPDE23Fl2jOxionXk +IcOM+Mvv6jdituVArCWeinmkGN6u1enBDUq5FPZk+xjw/hIYdRMY9unSBPiXs18eF4WG5iJbqYY+ fiNpOj3O1OTUPrnHUNXkivQhUpL5Fjk5KGdnwxopcDuaY6kkh55btxVNSBmLUbYxEPG/onJtBrVim +u+Q8HGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNI80-001sA1-R5; Thu, 24 Feb 2022 17:42:09 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNI7x-001s9C-PM for linux-arm-kernel@lists.infradead.org; Thu, 24 Feb 2022 17:42:07 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 43BB1618B8; Thu, 24 Feb 2022 17:42:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A05FCC340E9; Thu, 24 Feb 2022 17:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645724524; bh=iD5+0LBNH7T6gpbIgLDfaNdtblX7tu5a+rnPBgdz2ag=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cZjRTQ2AJH31EaiDy2kOqeFg/ZVo9YKsQ+rfXyIwvlJ1MWHCw1TQJQp/2z3Km5uyp 5u/HLfIDqQ4D3lPJyP3+v5lPnFIgbTvflxesDJh6RqzMvNbL+FPwFBBNj7exCLM5qX 12gz0AhM95QVbQtdptv9qadAetfCZidcI2vobDykVoYjtmrhTpFOmvPX7CkAynpNDZ fdpg1qUtigQ7l4XP54yjT6033TZxiMNZui6jx5mmeapTAETFD9aHB2b2MZ0P3B3W35 B7aYl3RZD0k1uK04XlaKl+RXwD4Ti5UBEmA+4iXPdFJ+/7+3VUbl4dMfheyzOQKJcE qv7yuXxygQ8NQ== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nNI7u-00AGAn-7S; Thu, 24 Feb 2022 17:42:02 +0000 MIME-Version: 1.0 Date: Thu, 24 Feb 2022 17:42:02 +0000 From: Marc Zyngier To: Thierry Reding Cc: linux-kernel@vger.kernel.org, Linus Walleij , Bartosz Golaszewski , Joey Gouly , Jonathan Hunter , Hector Martin , Sven Peter , Alyssa Rosenzweig , Bjorn Andersson , Andy Gross , Thomas Gleixner , linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 0/5] gpiolib: Handle immutable irq_chip structures In-Reply-To: References: <20220223154405.54912-1-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <371a530ea9ae8c58bf13ac16d1f2cd3c@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: thierry.reding@gmail.com, linux-kernel@vger.kernel.org, linus.walleij@linaro.org, brgl@bgdev.pl, joey.gouly@arm.com, jonathanh@nvidia.com, marcan@marcan.st, sven@svenpeter.dev, alyssa@rosenzweig.io, bjorn.andersson@linaro.org, agross@kernel.org, tglx@linutronix.de, linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, kernel-team@android.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-20220224_094205_938203_6280B12E X-CRM114-Status: GOOD ( 18.20 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-02-24 16:40, Thierry Reding wrote: > On Wed, Feb 23, 2022 at 03:44:00PM +0000, Marc Zyngier wrote: >> I recently realised that the gpiolib play ugly tricks on the >> unsuspecting irq_chip structures by patching the callbacks. >> >> Not only this breaks when an irq_chip structure is made const (which >> really should be the default case), but it also forces this structure >> to be copied at nauseam for each instance of the GPIO block, which is >> a waste of memory. >> >> My current approach is to add a new irq_chip flag (IRQCHIP_IMMUTABLE) >> which does what it says on the tin: don't you dare writing there. >> Gpiolib is further updated not to install its own callbacks, and it >> becomes the responsibility of the driver to call into the gpiolib when >> required. This is similar to what we do for other subsystems such as >> PCI-MSI. >> >> 3 drivers are updated to this new model: M1, QC and Tegra, as I >> actively use them (though Tegra is hosed at the moment), keeping a > > Hosed in what way? Anything I can help with? Tegra186 doesn't boot as host1x is been broken since -rc1. I have been carrying this[1] patch which has been in -next for some time, but still not merged AFAICS. M. [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=irq/gpio-immutable&id=58d1d925f05485020306e5141336cfd2989843dc -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel