All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
@ 2021-08-26  6:04 ` Yajun Deng
  0 siblings, 0 replies; 12+ messages in thread
From: Yajun Deng @ 2021-08-26  6:04 UTC (permalink / raw)
  To: catalin.marinas, will, lorenzo.pieralisi
  Cc: linux-arm-kernel, linux-kernel, Yajun Deng

pcibios_alloc_irq() will be called in pci_device_probe(), but there
hasn't pcibios_free_irq() in arm64 architecture correspond it.
pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
So add pcibios_free_irq() for correspond it. This will be called
in pci_device_remove().

====================
v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
====================

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
 arch/arm64/kernel/pci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 2276689b5411..6ffd92126f65 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
 
 	return 0;
 }
+
+void pcibios_free_irq(struct pci_dev *dev)
+{
+	if (!acpi_disabled)
+		acpi_pci_irq_disable(dev);
+}
+
 #endif
 
 /*
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
@ 2021-08-26  6:04 ` Yajun Deng
  0 siblings, 0 replies; 12+ messages in thread
From: Yajun Deng @ 2021-08-26  6:04 UTC (permalink / raw)
  To: catalin.marinas, will, lorenzo.pieralisi
  Cc: linux-arm-kernel, linux-kernel, Yajun Deng

pcibios_alloc_irq() will be called in pci_device_probe(), but there
hasn't pcibios_free_irq() in arm64 architecture correspond it.
pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
So add pcibios_free_irq() for correspond it. This will be called
in pci_device_remove().

====================
v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
====================

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
 arch/arm64/kernel/pci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 2276689b5411..6ffd92126f65 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
 
 	return 0;
 }
+
+void pcibios_free_irq(struct pci_dev *dev)
+{
+	if (!acpi_disabled)
+		acpi_pci_irq_disable(dev);
+}
+
 #endif
 
 /*
-- 
2.32.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
  2021-08-26  6:04 ` Yajun Deng
@ 2021-09-21 13:47   ` Catalin Marinas
  -1 siblings, 0 replies; 12+ messages in thread
From: Catalin Marinas @ 2021-09-21 13:47 UTC (permalink / raw)
  To: Yajun Deng; +Cc: will, lorenzo.pieralisi, linux-arm-kernel, linux-kernel

On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> pcibios_alloc_irq() will be called in pci_device_probe(), but there
> hasn't pcibios_free_irq() in arm64 architecture correspond it.
> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
> So add pcibios_free_irq() for correspond it. This will be called
> in pci_device_remove().
> 
> ====================
> v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
> ====================
> 
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> ---
>  arch/arm64/kernel/pci.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> index 2276689b5411..6ffd92126f65 100644
> --- a/arch/arm64/kernel/pci.c
> +++ b/arch/arm64/kernel/pci.c
> @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
>  
>  	return 0;
>  }
> +
> +void pcibios_free_irq(struct pci_dev *dev)
> +{
> +	if (!acpi_disabled)
> +		acpi_pci_irq_disable(dev);
> +}

For symmetry with the alloc path, this looks fine but I'd like Lorenzo
to confirm.

The other questions, what does it fix and do we need a cc stable?

Thanks.

-- 
Catalin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
@ 2021-09-21 13:47   ` Catalin Marinas
  0 siblings, 0 replies; 12+ messages in thread
From: Catalin Marinas @ 2021-09-21 13:47 UTC (permalink / raw)
  To: Yajun Deng; +Cc: will, lorenzo.pieralisi, linux-arm-kernel, linux-kernel

On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> pcibios_alloc_irq() will be called in pci_device_probe(), but there
> hasn't pcibios_free_irq() in arm64 architecture correspond it.
> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
> So add pcibios_free_irq() for correspond it. This will be called
> in pci_device_remove().
> 
> ====================
> v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
> ====================
> 
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> ---
>  arch/arm64/kernel/pci.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> index 2276689b5411..6ffd92126f65 100644
> --- a/arch/arm64/kernel/pci.c
> +++ b/arch/arm64/kernel/pci.c
> @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
>  
>  	return 0;
>  }
> +
> +void pcibios_free_irq(struct pci_dev *dev)
> +{
> +	if (!acpi_disabled)
> +		acpi_pci_irq_disable(dev);
> +}

For symmetry with the alloc path, this looks fine but I'd like Lorenzo
to confirm.

The other questions, what does it fix and do we need a cc stable?

Thanks.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
  2021-08-26  6:04 ` Yajun Deng
@ 2021-09-21 15:47   ` Lorenzo Pieralisi
  -1 siblings, 0 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2021-09-21 15:47 UTC (permalink / raw)
  To: Yajun Deng; +Cc: catalin.marinas, will, linux-arm-kernel, linux-kernel

On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> pcibios_alloc_irq() will be called in pci_device_probe(), but there
> hasn't pcibios_free_irq() in arm64 architecture correspond it.
> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.

"pcibios_alloc_irq() is a weak function called to allocate IRQs for
a device in pci_device_probe(); arm64 implements it with
ACPI specific code to enable IRQs for a device.

When a device is removed (pci_device_remove()) the pcibios_free_irq()
counterpart is called.

Current arm64 code does not implement a pcibios_free_irq() function,
and therefore, the weak empty stub is executed, which means that the
IRQ for a device are not properly disabled when a device is removed.

Add an arm64 pcibios_free_irq() to undo the actions carried out in
pcibios_alloc_irq()."

This is a stub commit log. Then you need to describe the bug you
are fixing (if any, or it is just code inspection ?)

> So add pcibios_free_irq() for correspond it. This will be called
> in pci_device_remove().
> 
> ====================
> v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
> ====================

Don't add versioning in the commit log, it does not belong here.

I don't think we should send this to stable kernels straight away,
it is best to make sure we are not triggering any regressions first.

Lorenzo

> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> ---
>  arch/arm64/kernel/pci.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> index 2276689b5411..6ffd92126f65 100644
> --- a/arch/arm64/kernel/pci.c
> +++ b/arch/arm64/kernel/pci.c
> @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
>  
>  	return 0;
>  }
> +
> +void pcibios_free_irq(struct pci_dev *dev)
> +{
> +	if (!acpi_disabled)
> +		acpi_pci_irq_disable(dev);
> +}
> +
>  #endif
>  
>  /*
> -- 
> 2.32.0
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
@ 2021-09-21 15:47   ` Lorenzo Pieralisi
  0 siblings, 0 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2021-09-21 15:47 UTC (permalink / raw)
  To: Yajun Deng; +Cc: catalin.marinas, will, linux-arm-kernel, linux-kernel

On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> pcibios_alloc_irq() will be called in pci_device_probe(), but there
> hasn't pcibios_free_irq() in arm64 architecture correspond it.
> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.

"pcibios_alloc_irq() is a weak function called to allocate IRQs for
a device in pci_device_probe(); arm64 implements it with
ACPI specific code to enable IRQs for a device.

When a device is removed (pci_device_remove()) the pcibios_free_irq()
counterpart is called.

Current arm64 code does not implement a pcibios_free_irq() function,
and therefore, the weak empty stub is executed, which means that the
IRQ for a device are not properly disabled when a device is removed.

Add an arm64 pcibios_free_irq() to undo the actions carried out in
pcibios_alloc_irq()."

This is a stub commit log. Then you need to describe the bug you
are fixing (if any, or it is just code inspection ?)

> So add pcibios_free_irq() for correspond it. This will be called
> in pci_device_remove().
> 
> ====================
> v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
> ====================

Don't add versioning in the commit log, it does not belong here.

I don't think we should send this to stable kernels straight away,
it is best to make sure we are not triggering any regressions first.

Lorenzo

> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> ---
>  arch/arm64/kernel/pci.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> index 2276689b5411..6ffd92126f65 100644
> --- a/arch/arm64/kernel/pci.c
> +++ b/arch/arm64/kernel/pci.c
> @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
>  
>  	return 0;
>  }
> +
> +void pcibios_free_irq(struct pci_dev *dev)
> +{
> +	if (!acpi_disabled)
> +		acpi_pci_irq_disable(dev);
> +}
> +
>  #endif
>  
>  /*
> -- 
> 2.32.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
  2021-08-26  6:04 ` Yajun Deng
@ 2021-09-22  2:49   ` yajun.deng
  -1 siblings, 0 replies; 12+ messages in thread
From: yajun.deng @ 2021-09-22  2:49 UTC (permalink / raw)
  To: Lorenzo Pieralisi; +Cc: catalin.marinas, will, linux-arm-kernel, linux-kernel

September 21, 2021 11:47 PM, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com> wrote:

> On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> 
>> pcibios_alloc_irq() will be called in pci_device_probe(), but there
>> hasn't pcibios_free_irq() in arm64 architecture correspond it.
>> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
> 
> "pcibios_alloc_irq() is a weak function called to allocate IRQs for
> a device in pci_device_probe(); arm64 implements it with
> ACPI specific code to enable IRQs for a device.
> 
> When a device is removed (pci_device_remove()) the pcibios_free_irq()
> counterpart is called.
> 
> Current arm64 code does not implement a pcibios_free_irq() function,
> and therefore, the weak empty stub is executed, which means that the
> IRQ for a device are not properly disabled when a device is removed.
> 
> Add an arm64 pcibios_free_irq() to undo the actions carried out in
> pcibios_alloc_irq()."
> 
> This is a stub commit log. Then you need to describe the bug you
> are fixing (if any, or it is just code inspection ?)
> 
It is just code inspection.
>> So add pcibios_free_irq() for correspond it. This will be called
>> in pci_device_remove().
>> 
>> ====================
>> v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
>> ====================
> 
> Don't add versioning in the commit log, it does not belong here.
> 
> I don't think we should send this to stable kernels straight away,
> it is best to make sure we are not triggering any regressions first.
> 
> Lorenzo
> 
>> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
>> ---
>> arch/arm64/kernel/pci.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>> 
>> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
>> index 2276689b5411..6ffd92126f65 100644
>> --- a/arch/arm64/kernel/pci.c
>> +++ b/arch/arm64/kernel/pci.c
>> @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
>> 
>> return 0;
>> }
>> +
>> +void pcibios_free_irq(struct pci_dev *dev)
>> +{
>> + if (!acpi_disabled)
>> + acpi_pci_irq_disable(dev);
>> +}
>> +
>> #endif
>> 
>> /*
>> --
>> 2.32.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
@ 2021-09-22  2:49   ` yajun.deng
  0 siblings, 0 replies; 12+ messages in thread
From: yajun.deng @ 2021-09-22  2:49 UTC (permalink / raw)
  To: Lorenzo Pieralisi; +Cc: catalin.marinas, will, linux-arm-kernel, linux-kernel

September 21, 2021 11:47 PM, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com> wrote:

> On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> 
>> pcibios_alloc_irq() will be called in pci_device_probe(), but there
>> hasn't pcibios_free_irq() in arm64 architecture correspond it.
>> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
> 
> "pcibios_alloc_irq() is a weak function called to allocate IRQs for
> a device in pci_device_probe(); arm64 implements it with
> ACPI specific code to enable IRQs for a device.
> 
> When a device is removed (pci_device_remove()) the pcibios_free_irq()
> counterpart is called.
> 
> Current arm64 code does not implement a pcibios_free_irq() function,
> and therefore, the weak empty stub is executed, which means that the
> IRQ for a device are not properly disabled when a device is removed.
> 
> Add an arm64 pcibios_free_irq() to undo the actions carried out in
> pcibios_alloc_irq()."
> 
> This is a stub commit log. Then you need to describe the bug you
> are fixing (if any, or it is just code inspection ?)
> 
It is just code inspection.
>> So add pcibios_free_irq() for correspond it. This will be called
>> in pci_device_remove().
>> 
>> ====================
>> v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
>> ====================
> 
> Don't add versioning in the commit log, it does not belong here.
> 
> I don't think we should send this to stable kernels straight away,
> it is best to make sure we are not triggering any regressions first.
> 
> Lorenzo
> 
>> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
>> ---
>> arch/arm64/kernel/pci.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>> 
>> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
>> index 2276689b5411..6ffd92126f65 100644
>> --- a/arch/arm64/kernel/pci.c
>> +++ b/arch/arm64/kernel/pci.c
>> @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
>> 
>> return 0;
>> }
>> +
>> +void pcibios_free_irq(struct pci_dev *dev)
>> +{
>> + if (!acpi_disabled)
>> + acpi_pci_irq_disable(dev);
>> +}
>> +
>> #endif
>> 
>> /*
>> --
>> 2.32.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
  2021-09-22  2:49   ` yajun.deng
@ 2021-09-22 16:22     ` Lorenzo Pieralisi
  -1 siblings, 0 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2021-09-22 16:22 UTC (permalink / raw)
  To: yajun.deng; +Cc: catalin.marinas, will, linux-arm-kernel, linux-kernel

On Wed, Sep 22, 2021 at 02:49:13AM +0000, yajun.deng@linux.dev wrote:
> September 21, 2021 11:47 PM, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com> wrote:
> 
> > On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> > 
> >> pcibios_alloc_irq() will be called in pci_device_probe(), but there
> >> hasn't pcibios_free_irq() in arm64 architecture correspond it.
> >> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
> > 
> > "pcibios_alloc_irq() is a weak function called to allocate IRQs for
> > a device in pci_device_probe(); arm64 implements it with
> > ACPI specific code to enable IRQs for a device.
> > 
> > When a device is removed (pci_device_remove()) the pcibios_free_irq()
> > counterpart is called.
> > 
> > Current arm64 code does not implement a pcibios_free_irq() function,
> > and therefore, the weak empty stub is executed, which means that the
> > IRQ for a device are not properly disabled when a device is removed.
> > 
> > Add an arm64 pcibios_free_irq() to undo the actions carried out in
> > pcibios_alloc_irq()."
> > 
> > This is a stub commit log. Then you need to describe the bug you
> > are fixing (if any, or it is just code inspection ?)
> > 
> It is just code inspection.

Before merging it it must be tested, which would prove it is needed.

Lorenzo

> >> So add pcibios_free_irq() for correspond it. This will be called
> >> in pci_device_remove().
> >> 
> >> ====================
> >> v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
> >> ====================
> > 
> > Don't add versioning in the commit log, it does not belong here.
> > 
> > I don't think we should send this to stable kernels straight away,
> > it is best to make sure we are not triggering any regressions first.
> > 
> > Lorenzo
> > 
> >> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> >> ---
> >> arch/arm64/kernel/pci.c | 7 +++++++
> >> 1 file changed, 7 insertions(+)
> >> 
> >> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> >> index 2276689b5411..6ffd92126f65 100644
> >> --- a/arch/arm64/kernel/pci.c
> >> +++ b/arch/arm64/kernel/pci.c
> >> @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
> >> 
> >> return 0;
> >> }
> >> +
> >> +void pcibios_free_irq(struct pci_dev *dev)
> >> +{
> >> + if (!acpi_disabled)
> >> + acpi_pci_irq_disable(dev);
> >> +}
> >> +
> >> #endif
> >> 
> >> /*
> >> --
> >> 2.32.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
@ 2021-09-22 16:22     ` Lorenzo Pieralisi
  0 siblings, 0 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2021-09-22 16:22 UTC (permalink / raw)
  To: yajun.deng; +Cc: catalin.marinas, will, linux-arm-kernel, linux-kernel

On Wed, Sep 22, 2021 at 02:49:13AM +0000, yajun.deng@linux.dev wrote:
> September 21, 2021 11:47 PM, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com> wrote:
> 
> > On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> > 
> >> pcibios_alloc_irq() will be called in pci_device_probe(), but there
> >> hasn't pcibios_free_irq() in arm64 architecture correspond it.
> >> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
> > 
> > "pcibios_alloc_irq() is a weak function called to allocate IRQs for
> > a device in pci_device_probe(); arm64 implements it with
> > ACPI specific code to enable IRQs for a device.
> > 
> > When a device is removed (pci_device_remove()) the pcibios_free_irq()
> > counterpart is called.
> > 
> > Current arm64 code does not implement a pcibios_free_irq() function,
> > and therefore, the weak empty stub is executed, which means that the
> > IRQ for a device are not properly disabled when a device is removed.
> > 
> > Add an arm64 pcibios_free_irq() to undo the actions carried out in
> > pcibios_alloc_irq()."
> > 
> > This is a stub commit log. Then you need to describe the bug you
> > are fixing (if any, or it is just code inspection ?)
> > 
> It is just code inspection.

Before merging it it must be tested, which would prove it is needed.

Lorenzo

> >> So add pcibios_free_irq() for correspond it. This will be called
> >> in pci_device_remove().
> >> 
> >> ====================
> >> v2: remove the change in pcibios_alloc_irq(), and modify the commit log.
> >> ====================
> > 
> > Don't add versioning in the commit log, it does not belong here.
> > 
> > I don't think we should send this to stable kernels straight away,
> > it is best to make sure we are not triggering any regressions first.
> > 
> > Lorenzo
> > 
> >> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> >> ---
> >> arch/arm64/kernel/pci.c | 7 +++++++
> >> 1 file changed, 7 insertions(+)
> >> 
> >> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> >> index 2276689b5411..6ffd92126f65 100644
> >> --- a/arch/arm64/kernel/pci.c
> >> +++ b/arch/arm64/kernel/pci.c
> >> @@ -29,6 +29,13 @@ int pcibios_alloc_irq(struct pci_dev *dev)
> >> 
> >> return 0;
> >> }
> >> +
> >> +void pcibios_free_irq(struct pci_dev *dev)
> >> +{
> >> + if (!acpi_disabled)
> >> + acpi_pci_irq_disable(dev);
> >> +}
> >> +
> >> #endif
> >> 
> >> /*
> >> --
> >> 2.32.0

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
  2021-09-22 16:22     ` Lorenzo Pieralisi
@ 2021-10-11 11:09       ` Will Deacon
  -1 siblings, 0 replies; 12+ messages in thread
From: Will Deacon @ 2021-10-11 11:09 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: yajun.deng, catalin.marinas, linux-arm-kernel, linux-kernel

On Wed, Sep 22, 2021 at 05:22:01PM +0100, Lorenzo Pieralisi wrote:
> On Wed, Sep 22, 2021 at 02:49:13AM +0000, yajun.deng@linux.dev wrote:
> > September 21, 2021 11:47 PM, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com> wrote:
> > 
> > > On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> > > 
> > >> pcibios_alloc_irq() will be called in pci_device_probe(), but there
> > >> hasn't pcibios_free_irq() in arm64 architecture correspond it.
> > >> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
> > > 
> > > "pcibios_alloc_irq() is a weak function called to allocate IRQs for
> > > a device in pci_device_probe(); arm64 implements it with
> > > ACPI specific code to enable IRQs for a device.
> > > 
> > > When a device is removed (pci_device_remove()) the pcibios_free_irq()
> > > counterpart is called.
> > > 
> > > Current arm64 code does not implement a pcibios_free_irq() function,
> > > and therefore, the weak empty stub is executed, which means that the
> > > IRQ for a device are not properly disabled when a device is removed.
> > > 
> > > Add an arm64 pcibios_free_irq() to undo the actions carried out in
> > > pcibios_alloc_irq()."
> > > 
> > > This is a stub commit log. Then you need to describe the bug you
> > > are fixing (if any, or it is just code inspection ?)
> > > 
> > It is just code inspection.
> 
> Before merging it it must be tested, which would prove it is needed.

Ok, I'll ignore this patch for now then. Please yell if you want me to pick
it up.

Will

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function
@ 2021-10-11 11:09       ` Will Deacon
  0 siblings, 0 replies; 12+ messages in thread
From: Will Deacon @ 2021-10-11 11:09 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: yajun.deng, catalin.marinas, linux-arm-kernel, linux-kernel

On Wed, Sep 22, 2021 at 05:22:01PM +0100, Lorenzo Pieralisi wrote:
> On Wed, Sep 22, 2021 at 02:49:13AM +0000, yajun.deng@linux.dev wrote:
> > September 21, 2021 11:47 PM, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com> wrote:
> > 
> > > On Thu, Aug 26, 2021 at 02:04:06PM +0800, Yajun Deng wrote:
> > > 
> > >> pcibios_alloc_irq() will be called in pci_device_probe(), but there
> > >> hasn't pcibios_free_irq() in arm64 architecture correspond it.
> > >> pcibios_free_irq() is an empty weak function in drivers/pci/pci-driver.c.
> > > 
> > > "pcibios_alloc_irq() is a weak function called to allocate IRQs for
> > > a device in pci_device_probe(); arm64 implements it with
> > > ACPI specific code to enable IRQs for a device.
> > > 
> > > When a device is removed (pci_device_remove()) the pcibios_free_irq()
> > > counterpart is called.
> > > 
> > > Current arm64 code does not implement a pcibios_free_irq() function,
> > > and therefore, the weak empty stub is executed, which means that the
> > > IRQ for a device are not properly disabled when a device is removed.
> > > 
> > > Add an arm64 pcibios_free_irq() to undo the actions carried out in
> > > pcibios_alloc_irq()."
> > > 
> > > This is a stub commit log. Then you need to describe the bug you
> > > are fixing (if any, or it is just code inspection ?)
> > > 
> > It is just code inspection.
> 
> Before merging it it must be tested, which would prove it is needed.

Ok, I'll ignore this patch for now then. Please yell if you want me to pick
it up.

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-10-11 11:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26  6:04 [PATCH linux-next v2] arm64: PCI: Introduce pcibios_free_irq() helper function Yajun Deng
2021-08-26  6:04 ` Yajun Deng
2021-09-21 13:47 ` Catalin Marinas
2021-09-21 13:47   ` Catalin Marinas
2021-09-21 15:47 ` Lorenzo Pieralisi
2021-09-21 15:47   ` Lorenzo Pieralisi
2021-09-22  2:49 ` yajun.deng
2021-09-22  2:49   ` yajun.deng
2021-09-22 16:22   ` Lorenzo Pieralisi
2021-09-22 16:22     ` Lorenzo Pieralisi
2021-10-11 11:09     ` Will Deacon
2021-10-11 11:09       ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.