Re: [PATCH v2 23/23] PCI: aardvark: Make main irq_chip structure a static driver structure
From: Marek Behún <kabel@kernel.org>
Date: 2022-01-10 10:24:34
Also in:
linux-pci
On Mon, 10 Jan 2022 09:28:39 +0000 Marc Zyngier [off-list ref] wrote:
On 2022-01-10 01:50, Marek Behún wrote:quoted
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. 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. 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 (they are generated by emulated bridge's rp_irq_chip).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. 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel