[PATCH 0/2] NTB: epf: Fix ntb_hw_epf ISR issues

Koichiro Den posted 2 patches 1 month, 1 week ago
drivers/ntb/hw/epf/ntb_hw_epf.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
[PATCH 0/2] NTB: epf: Fix ntb_hw_epf ISR issues
Posted by Koichiro Den 1 month, 1 week ago
ntb_hw_epf handles doorbell interrupts using multiple MSI/MSI-X vectors.
This small patch series is to address two issues in the interrupt
setup/handler path:

 1) ntb_epf_init_isr() does not unwind already requested IRQs when
    request_irq() fails part-way through the vector loop.

 2) ntb_epf_vec_isr() calls pci_irq_vector() in hardirq context to
    derive the vector number. pci_irq_vector() performs an MSI domain
    lookup (msi_get_virq()) that takes a mutex, which can trigger
    "scheduling while atomic" splats.

Patch 1 fixes the request_irq() unwind path.
Patch 2 caches the Linux IRQ number for vector 0 and uses it as a base in
the ISR, avoiding pci_irq_vector() from hardirq context.

Both patches are Cc'd to stable (v5.12+).

Best regards,
Koichiro

Koichiro Den (2):
  NTB: epf: Fix request_irq() unwind in ntb_epf_init_isr()
  NTB: epf: Avoid pci_irq_vector() from hardirq context

 drivers/ntb/hw/epf/ntb_hw_epf.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

-- 
2.51.0
Re: [PATCH 0/2] NTB: epf: Fix ntb_hw_epf ISR issues
Posted by Koichiro Den 3 weeks, 6 days ago
On Wed, Mar 04, 2026 at 05:30:26PM +0900, Koichiro Den wrote:
> ntb_hw_epf handles doorbell interrupts using multiple MSI/MSI-X vectors.
> This small patch series is to address two issues in the interrupt
> setup/handler path:
> 
>  1) ntb_epf_init_isr() does not unwind already requested IRQs when
>     request_irq() fails part-way through the vector loop.
> 
>  2) ntb_epf_vec_isr() calls pci_irq_vector() in hardirq context to
>     derive the vector number. pci_irq_vector() performs an MSI domain
>     lookup (msi_get_virq()) that takes a mutex, which can trigger
>     "scheduling while atomic" splats.
> 
> Patch 1 fixes the request_irq() unwind path.
> Patch 2 caches the Linux IRQ number for vector 0 and uses it as a base in
> the ISR, avoiding pci_irq_vector() from hardirq context.
> 
> Both patches are Cc'd to stable (v5.12+).
> 
> Best regards,
> Koichiro
> 
> Koichiro Den (2):
>   NTB: epf: Fix request_irq() unwind in ntb_epf_init_isr()
>   NTB: epf: Avoid pci_irq_vector() from hardirq context

Jon or Dave,

Gentle ping on this series.
I would appreciate it if you could take a look when you have a chance.

Best regards,
Koichiro

> 
>  drivers/ntb/hw/epf/ntb_hw_epf.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> -- 
> 2.51.0
> 
>
Re: [PATCH 0/2] NTB: epf: Fix ntb_hw_epf ISR issues
Posted by Dave Jiang 3 weeks, 4 days ago

On 3/16/26 8:01 PM, Koichiro Den wrote:
> On Wed, Mar 04, 2026 at 05:30:26PM +0900, Koichiro Den wrote:
>> ntb_hw_epf handles doorbell interrupts using multiple MSI/MSI-X vectors.
>> This small patch series is to address two issues in the interrupt
>> setup/handler path:
>>
>>  1) ntb_epf_init_isr() does not unwind already requested IRQs when
>>     request_irq() fails part-way through the vector loop.
>>
>>  2) ntb_epf_vec_isr() calls pci_irq_vector() in hardirq context to
>>     derive the vector number. pci_irq_vector() performs an MSI domain
>>     lookup (msi_get_virq()) that takes a mutex, which can trigger
>>     "scheduling while atomic" splats.
>>
>> Patch 1 fixes the request_irq() unwind path.
>> Patch 2 caches the Linux IRQ number for vector 0 and uses it as a base in
>> the ISR, avoiding pci_irq_vector() from hardirq context.
>>
>> Both patches are Cc'd to stable (v5.12+).
>>
>> Best regards,
>> Koichiro
>>
>> Koichiro Den (2):
>>   NTB: epf: Fix request_irq() unwind in ntb_epf_init_isr()
>>   NTB: epf: Avoid pci_irq_vector() from hardirq context
> 
> Jon or Dave,
> 
> Gentle ping on this series.
> I would appreciate it if you could take a look when you have a chance.

For the series, LGTM
Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> 
> Best regards,
> Koichiro
> 
>>
>>  drivers/ntb/hw/epf/ntb_hw_epf.c | 14 +++++++-------
>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> -- 
>> 2.51.0
>>
>>