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 0F398C433F5 for ; Thu, 24 Feb 2022 16:42:06 +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: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From: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=Q6bJqrNw6/rmP38wJLcVgwIUOyYH3otQY+fkUR8LAk8=; b=wIaWUqYLb0Zv1pAV7y4MOhah5J OKv1klIICINjVsw5SDMu5KblxFqs86i+alkFOdr313BIeIGeyDZOM/HLY7c8Uo7CxVSXRUND4cVXE 52faCvCXTiynYveOPK2gM0zX3GWr6Bq5iSmNvY1BsrJaf55q1cY6tHHUjtN8o01ArFKgBjnK2o8wq NFe8ZZ7lIUrKZd0dIThaGJMRJMEubArpoAlG6Kh3lkcTa0udbNNVULT9h9Fl+xdYmAHiPh+p3Q6cw RxUkXQzIqmVCHArcCP0DLFk/cOgy160IlIK8RsJf4BLzfvPWX2mlpr/dddSeN9+BYHIsaKFUAbT9Z y+yK8V9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNHAk-001bMT-I8; Thu, 24 Feb 2022 16:40:54 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNHAe-001bJy-TN for linux-arm-kernel@lists.infradead.org; Thu, 24 Feb 2022 16:40:52 +0000 Received: by mail-ed1-x52a.google.com with SMTP id s14so3742835edw.0 for ; Thu, 24 Feb 2022 08:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qALsUfBRNZNy1q4MnFnN/Mg68ORU7TGkkXw7GkgCc1I=; b=Ssjj3P1kELJ8G5JUikFQhi0FmjJbN5NEY1VUlZ/Va4BVNhkXvxOxH2PMKMAG0LTXJD uOe8kD+hfDyom7n8ch4Ni8Qg57So73H2MfsXxUxUCmYOZbWEuG1BRlB2QS5qyZUvHRCi a66Kml+ysys3+kH2Oft17MXzFK0J5qwFjIW8+b0lQ0DV1MgIu/0HQ49vAlo1UlDtWlHP 8fkCv9eaeLa2SeYkcoChzqFoDXp03jX7KgTYrSqs4qlf76BBghLgOL5nDop0b6u9Ht03 etRz+Neju6nQkwBHq5n7Q2tCHOOfi0g6UUdDyf1Ewld0RQJ27U/0BiYMKSKPqzn5/WZV S1Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qALsUfBRNZNy1q4MnFnN/Mg68ORU7TGkkXw7GkgCc1I=; b=uITEDMF6D6LTSq8Xf6W1IpsGXWS8iQcgCZwdQrr+BbvaE4ZhKbUtPfzujshWbpdbCK y5XIxeyyNEW11KKVFqIN/wkwdv6h7YpwlVY2IZ7/lK1amiid+38BsytmqEdUIxuZe70J UWfmD7gsawX8K8w90EN3TJxtfAO15dt+yud59bhirLsL7O2Cx/OzNJJy3iE+lyUdQvGW A8as0aU+seiCzPn5q7T/jYaNa1pQBYLbz1B7han2mKvJNp9JEyewOiDFJLQkt7OQ1stC 2bshUQ8bD6o39KBfJge0oFHLeiG9l7P4GTgK2BnDxgL7KR903cV/l3gdb887WrCh6Gc+ 65uA== X-Gm-Message-State: AOAM530S2bgymlaw3LNdZLL5NbW+E/h6HiJqVW3bGf5qcntuu15bne56 M+VNZxrhGs1HC3RZxINrgH8= X-Google-Smtp-Source: ABdhPJyjBea5qD7kSqwqF+o5kzXVs8iZMyCe9mWUHCCP8R6Qw0DaiQ97szh10dh6UTSupoTJtGQJow== X-Received: by 2002:a05:6402:5cb:b0:410:82a0:5d76 with SMTP id n11-20020a05640205cb00b0041082a05d76mr3158717edx.130.1645720846536; Thu, 24 Feb 2022 08:40:46 -0800 (PST) Received: from orome ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id v30sm1585123ejv.76.2022.02.24.08.40.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:40:45 -0800 (PST) Date: Thu, 24 Feb 2022 17:40:43 +0100 From: Thierry Reding To: Marc Zyngier 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 Message-ID: References: <20220223154405.54912-1-maz@kernel.org> MIME-Version: 1.0 In-Reply-To: <20220223154405.54912-1-maz@kernel.org> User-Agent: Mutt/2.2.1 (c8109e14) (2022-02-19) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220224_084048_971526_51B4E079 X-CRM114-Status: GOOD ( 20.18 ) 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: multipart/mixed; boundary="===============1379590781057991937==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1379590781057991937== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wDjQmXbwTP1gIXI+" Content-Disposition: inline --wDjQmXbwTP1gIXI+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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. >=20 > 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? Thierry --wDjQmXbwTP1gIXI+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmIXtQoACgkQ3SOs138+ s6GqbBAAhO4/JiZXWM3idaYCebTwochmkwPmAKDKubIQPPRSDMr23n5LKH7MR8QO I45Xq0AkDNOEjxx0qCWn+gJ+f8mTn5QfCrkOT74ysx4ifZtPs4ZTxC9IFuf1VZV4 3S4Q4cv7GlCecPYs7P43Tj7EJwGp/oHFdAA87n4ESLf391p4xOMscXbu1KRVmJJm 0HcOEsjKNzXk89JDS5UyuY+Vy9mIT/+yQsnNnI3LbZug3x6I/zeu2EZjCvI8mZY6 d1GR96HuEEMkQULGYFQC/Ur/GE4ewF41LB8RLCmdb4pInXWjBakTKnKfuRJfLPbR BB9kLBquMmb9K/fmLBiH+CA5PwwYQbpBflUcERAO3bQ+drNzN+sbzM2bXret0KQH +jizLi6oTJmDZTiWIVXffqctZBgpJ+jX8WnSZH9BPsLl5tuX0J51vabLgknYcF+P TRN8srwKbHpza25UeDctjyvzb7esps/ssWf7Bpay8M2J9BiJ6/MwVJ6jtDMu+NDj nZnrUy1Mh/plKCNbPvWP/Xlwqno/1y0vYaX0g3Jd6m8b6v6SicgcezH6lx9JsPJE tCxZGyzesMspVlCxso2UIKkO+V63e5TWiEAZmlr1KhYoaJvOVy1DpuRo1ubQMLP2 prAS4hGV6aFCSGqaQIyODIy1pploi3mjgVzGsV1dvbiriSy/co8= =i/AT -----END PGP SIGNATURE----- --wDjQmXbwTP1gIXI+-- --===============1379590781057991937== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1379590781057991937==--