[patch 0/2] PCI/MSI: Avoid PCI level masking during normal operation if requested

Thomas Gleixner posted 2 patches 4 weeks, 1 day ago
irqchip/irq-msi-lib.c |   14 ++++++++++++++
pci/msi/irqdomain.c   |   20 --------------------
2 files changed, 14 insertions(+), 20 deletions(-)
[patch 0/2] PCI/MSI: Avoid PCI level masking during normal operation if requested
Posted by Thomas Gleixner 4 weeks, 1 day ago
This is a follow up to Marc's attempt on this:

     https://lore.kernel.org/lkml/20250517103011.2573288-1-maz@kernel.org

Now that the PCI/MSI side has irq_startup/shutdown() callbacks, which do
the [un]masking at the PCI level, let the MSI parent domains which insist
on being in charge of masking do so for normal operations.

That avoids going out to the PCI endpoint in the case that an interrupt has
to be masked on arrival of an interrupt in software (lazy) disabled state.

That's achieved by overwriting the irq_[un]mask() callbacks in the irq/MSI
library.

As a consequence the conditional mask/unmask logic in the regular
irq_[un]mask() callbacks of the PCI/MSI domain is not longer required.

Thanks,

	tglx
---
 irqchip/irq-msi-lib.c |   14 ++++++++++++++
 pci/msi/irqdomain.c   |   20 --------------------
 2 files changed, 14 insertions(+), 20 deletions(-)
Re: [patch 0/2] PCI/MSI: Avoid PCI level masking during normal operation if requested
Posted by Marc Zyngier 3 weeks, 2 days ago
On Wed, 03 Sep 2025 15:04:44 +0100,
Thomas Gleixner <tglx@linutronix.de> wrote:
> 
> This is a follow up to Marc's attempt on this:
> 
>      https://lore.kernel.org/lkml/20250517103011.2573288-1-maz@kernel.org
> 
> Now that the PCI/MSI side has irq_startup/shutdown() callbacks, which do
> the [un]masking at the PCI level, let the MSI parent domains which insist
> on being in charge of masking do so for normal operations.
> 
> That avoids going out to the PCI endpoint in the case that an interrupt has
> to be masked on arrival of an interrupt in software (lazy) disabled state.
> 
> That's achieved by overwriting the irq_[un]mask() callbacks in the irq/MSI
> library.
> 
> As a consequence the conditional mask/unmask logic in the regular
> irq_[un]mask() callbacks of the PCI/MSI domain is not longer required.

I took this for a quick ride on some of my least favourite machines,
and nothing caught fire.

FWIW:

Acked-by: Marc Zyngier <maz@kernel.org>
Tested-by: Marc Zyngier <maz@kernel.org>

Thanks for having re-spun it,

	M.

-- 
Without deviation from the norm, progress is not possible.