[PATCH linux-next] arm64: PCI: Introduce pcibios_free_irq() helper function

Lorenzo Pieralisi lorenzo.pieralisi at arm.com
Wed Aug 25 06:30:35 PDT 2021


On Wed, Aug 25, 2021 at 03:16:12PM +0800, Yajun Deng wrote:
> Introduce pcibios_free_irq() to free irq in pci_device_probe() and
> pci_device_remove() that in drivers/pci/pci-driver.c.

Add a rationale - it is just code inspection or you are fixing a bug ?

> Signed-off-by: Yajun Deng <yajun.deng at linux.dev>
> ---
>  arch/arm64/kernel/pci.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> index 1006ed2d7c60..40da5aff4548 100644
> --- a/arch/arm64/kernel/pci.c
> +++ b/arch/arm64/kernel/pci.c
> @@ -25,10 +25,18 @@
>  int pcibios_alloc_irq(struct pci_dev *dev)
>  {
>  	if (!acpi_disabled)
> -		acpi_pci_irq_enable(dev);
> +		return acpi_pci_irq_enable(dev);

This is an unrelated change and it is potentially introducing
regressions. I need to page in the reasons why on arm64 we had to resort
to pcibios_alloc_irq() (probe ordering IIRC) - in the meanwhile
this function stays as it is.

>  	return 0;
>  }
> +
> +void pcibios_free_irq(struct pci_dev *dev)
> +{
> +	if (!acpi_disabled)
> +		acpi_pci_irq_disable(dev);
> +
> +}

Adding pcibios_free_irq() makes sense and I believe it is a genuine
"fix".

Please add any information in the commit log that explains the
run-time condition you are fixing.

Thanks,
Lorenzo



More information about the linux-arm-kernel mailing list