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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 311D8C433EF for ; Mon, 10 Jan 2022 10:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243898AbiAJKXQ (ORCPT ); Mon, 10 Jan 2022 05:23:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243887AbiAJKXH (ORCPT ); Mon, 10 Jan 2022 05:23:07 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 476D8C061751 for ; Mon, 10 Jan 2022 02:23:07 -0800 (PST) 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 DC9156124E for ; Mon, 10 Jan 2022 10:23:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06698C36AE9; Mon, 10 Jan 2022 10:23:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641810186; bh=52SGtoSXoHH5/gXeIjcW4u1oqUamKPxuDGP8DWpswyk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oopgaGtWWTvJOJd+5cECRJ3DZFgE28a/xrvInrVxjiTY6Jm8KD6qL1YrLC+UL7qm/ vGO40nuIh6hWP8g9By3gWBpPReklOQvb8gXvphuXIWPN9lpkH8BZS73X0LDYZbMxck rj78pjD+DaeTotMA+dcv+Kr1O8xRbtoEyxmxv8SB0KHjfuDANyCFGZ99t3Irhwxh1Y DI1OVVEXPX8zAvawKGFf9Y5MCX1pCReDBH+7YBMSTR5qIYpZab7JhoD/841enEE3bU SiC9Vn0XD6HMsCFVO0iyMkeOwlVMZgNPPh/fo9Ck6fQ6GP4zS6LRAs1NnwMeKmhN/t GjdfIznbRQMSQ== Date: Mon, 10 Jan 2022 11:23:01 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Marc Zyngier Cc: Lorenzo Pieralisi , Bjorn Helgaas , pali@kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 23/23] PCI: aardvark: Make main irq_chip structure a static driver structure Message-ID: <20220110112301.7e13c716@thinkpad> In-Reply-To: References: <20220110015018.26359-1-kabel@kernel.org> <20220110015018.26359-24-kabel@kernel.org> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Mon, 10 Jan 2022 09:28:39 +0000 Marc Zyngier wrote: > On 2022-01-10 01:50, Marek Beh=C3=BAn wrote: > > Marc Zyngier says [1] that we should use struct irq_chip as a global > > static struct in the driver. Even though the structure currently > > contains a dynamic member (parent_device), Marc says [2] that he plans > > to kill it and make the structure completely static. > >=20 > > We have already converted others irq_chip structures in this driver in > > this way, but we omitted this one because the .name member is > > dynamically created from device's name, and the name is displayed in > > sysfs, so changing it would break sysfs ABI. > >=20 > > The rationale for changing the name (to "advk-INT") in spite of sysfs > > ABI, and thus allowing to convert to a static structure, is that after > > the other changes we made in this series, the IRQ chip is basically > > something different: it no logner generates ERR and PME interrupts=20 > > (they > > are generated by emulated bridge's rp_irq_chip). =20 >=20 > There is no 'is spite of the ABI'. If you don't understand why > we don't break the ABI, you have an even bigger problem. >=20 > So NAK to this patch, now and forever. Any change to the structure to > make it read-only must allow the preservation of the existing names > when they are generated by the driver. Dear Marc, That's why I put it as a last patch here :) I have the questions 1) the first is that this driver has only ever been used on Armada 37xx, where there has always been only one PCIe controller, and it's name always was d0070000.pcie, so the irq_chip was always called d0070000.pcie-irq. So we could theoretically infer from config options if we are building for Armada 37xx: if ARM64 and ARMADA_37XX_CLK config options are enabled, make the name d0070000.pcie-irq, otherwise advk-INT ? 2) I tried to look for the name d0070000.pcie-irq in /proc and /sysfs, but couldn't find it there (not in /proc/interrupts nor anywhere else). It is possible that I omitted something, or that with other PCIe card it will show up when corresponding driver is loaded. But theoretically, if I could prove that until now this never appeared anywhere in sysfs for some reason, then we could change it, right? Becuase that way it isn't sysfs ABI change. Thanks. Marek