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 C2824C433EF for ; Thu, 24 Feb 2022 16:52:57 +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=O/+InZKjsOHsQnhVsAAobl4VFS0PJr6741jR2q061rA=; b=pfsKTtY5B8FNIMt8nHLH4hz8B3 +jfBp6MADqA22nugZg0+dYsBfLaQ7BMMqVipJY7SA3GpRQ4yxl3qY7caZPRNOTBEjOu6C9ancl2Pm RNMhipO8zYc47HRjfG0AtTbsXWjaQRp6lC0Rd/rz4hcsORoJ8aPqVcxa/KlrvER2CFzEkHibI+1zy +DV/uOhbqcP/Op5w59fQnUfRVwmbYlYIJoNZni5M/cEkrPUsnHBgxRSgypmfiqT6fTxCZOPk8vKBC rezmKooSpHBjrZgywfNDeMuKcnL/De4bgcYZXOAECG7Rulc+Sjsob3M0vxr9tqsXtXMfCGf86xxHd xhgjZPKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNHLK-001dDz-Fx; Thu, 24 Feb 2022 16:51:50 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNHLG-001dCi-Us for linux-arm-kernel@lists.infradead.org; Thu, 24 Feb 2022 16:51:48 +0000 Received: by mail-ej1-x632.google.com with SMTP id qk11so5714093ejb.2 for ; Thu, 24 Feb 2022 08:51:46 -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=0BX8BM017uCOv9ckNj58aZrZbCd/kR/+hefTXMO9tPo=; b=kiIocb6M3Uuv4xiRzAdVw033se264t+5e8SmYP5ibq1I4FYRMAbbkXLawlWwzOm54C xHb9/0YbSlMUpw2Y6llCywFgYrAx7ZpZqQ+LatVEGnWWdWhVfJOQgo+QQSMiaB0nhH26 kpkq/SZK9dynlhtQuiHfpLZe9Mhcoq6diD0oyzZr+Eab5VLwELySFw3E0vHze+1GYjcg a7cktJzM4p6B4R9ymuUjhoB5MBJsi2ax6GGP6CGvS9MpQvS2yOvXYqUupHSeCx/uSRcg PBt4OTHJvYUrvjPylxPIa+CChh3DpYRgOwluNXETDaED4nhajMnp9x/THJUOxJfe+68g DzYQ== 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=0BX8BM017uCOv9ckNj58aZrZbCd/kR/+hefTXMO9tPo=; b=3ydzy5kAgTpT4FD8P/f0dSC1GR3uktzUaY1NLGoRGYtuhz/yVVcedaoRcF4cprLEvz 7ECRtkjSQePd0pyxb7FLNBzCyN2w9oUk6P+IYdsxd6RU4kDTxs1Ab4eWUJGNLTuup5yL 4+dSj+IrZbFFuthLLLwwxXq6sGjmMmIbX+2H66Gwy6PkYsmhz0wwwwjIYJzI8gEbEGiR 0HuAGlCWVJ+g+VocZgX+dDA4siujkMmYThQAjyRiWEhPgJcFZNL2kbCyPq0lco/7xS3F E92CYtmue8VHqgud4uNM0Rvi8yo3h/QUASFgaOop7TQKIW+I/p6fNuNKFsYCJ1y3aw/a cexA== X-Gm-Message-State: AOAM530nV+V7X0dSslbFEf1G3hz0AswEwrKL9wRToP+Mm2HezW+6nTp6 /ZvMyp3xmAaRkHtBOFjSJ3Q= X-Google-Smtp-Source: ABdhPJyWV1zkvb8+mEvqp9ZSTYLeQknbMbcIBqw4G7wy2t0xWvm2gOYKTOxfOHmqMh5tXSGKmjzpjg== X-Received: by 2002:a17:906:af79:b0:6ce:61d3:7e9b with SMTP id os25-20020a170906af7900b006ce61d37e9bmr3085459ejb.191.1645721505223; Thu, 24 Feb 2022 08:51:45 -0800 (PST) Received: from orome ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id j3sm1600520ejj.9.2022.02.24.08.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:51:44 -0800 (PST) Date: Thu, 24 Feb 2022 17:51:41 +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 1/5] gpio: Don't fiddle with irqchips marked as immutable Message-ID: References: <20220223154405.54912-1-maz@kernel.org> <20220223154405.54912-2-maz@kernel.org> MIME-Version: 1.0 In-Reply-To: <20220223154405.54912-2-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_085147_025317_3151ECFE X-CRM114-Status: GOOD ( 19.98 ) 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="===============0032166168465563587==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0032166168465563587== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vbN/cyUZyiD0I2CK" Content-Disposition: inline --vbN/cyUZyiD0I2CK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 23, 2022 at 03:44:01PM +0000, Marc Zyngier wrote: > In order to move away from gpiolib messing with the internals of > unsuspecting irqchips, add a flag by which irqchips advertise > that they are not to be messed with, and do solemnly swear that > they correctly call into the gpiolib helpers wueh required. >=20 > Signed-off-by: Marc Zyngier > --- > drivers/gpio/gpiolib.c | 7 ++++++- > include/linux/irq.h | 2 ++ > kernel/irq/debugfs.c | 1 + > 3 files changed, 9 insertions(+), 1 deletion(-) I kind of like this. The bit where the const cast is essentially guarded by an "immutable" flag is a bit funky, but it doesn't look like there is a good way to do it by making all references const without doing a huge all-at-once conversion. I've always found it a bit irritating that irq_chip was somewhere between a container for chip-specific data and an "ops" structure. I think it'd be even nicer if this was split into an extra struct irq_chip_ops, which could then always be const and a struct irq_chip that contained primarily chip-specific data as well as a pointer to struct irq_chip_ops. But again, this seems fairly tricky to pull off given all the interdependencies and we can iterate on this in the future, so this seems like a good enough compromise: Acked-by: Thierry Reding --vbN/cyUZyiD0I2CK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmIXt5oACgkQ3SOs138+ s6Hsmg//ZlvIGlAISsBwoAWBpifpjvE4OPtPa2w5okmTJxjSFYwmu1dcqaGOQbqk PM58PdveLzwtzZUMy2BFNGtyE1cXPfDvIQlUP2QXjkpmpOH0nZvLbKLtbaOKPe5/ k7ZT1snfCCPyCSkTt3ObyRr/vd09RHkcocvJ3BPX8qgcFs8RP+csLO4LbtPdN4Mp DTPbjaUqdqG2RvSuEtRrHenTZ6f+g+39LrwgfzRXztvQvFtNEmK+D/sZDENkTVtm +YIJBgiANbzhXtib+/9FaG3MJECmu6ZBNNSaZat91Ksn+TWDz/RYRdZSsEcposEx eH5P6Oas2DsQ8P8ny7jplcGV1nOGobRdQBRWnWHXKDGrsDBaVzdFjc4Z/rzoRshO a5kV7CL+T6Gu+xVWS81PBBcUcwFsIpn5QWe32g3g0cPuNJpsWYpM6lnbH+CrQcQR LTOMQiTe8hyf6vdhTbdMfb6I/i3JscSm23KJYgZD1Se1bYkzi6DbCf62W2ygqHgT yakOPdNcZP8KZKp85niKcUdG/ecW9HtTSBGSLDkyMUgBqg4Jr/2uC6C1h/ra3t/D HlMJDYR4rrx0kR6JDiHl4Be0AJPPo2YksA+YZzVYIOgv0dMLzk9JX0AXeSwo6xBT Byu+xRCU7+shobZGJlJOJXnRXw7XwLhg3pdOwotfppxKxXcUgzU= =JQTC -----END PGP SIGNATURE----- --vbN/cyUZyiD0I2CK-- --===============0032166168465563587== 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 --===============0032166168465563587==--