Skip to content

genirq, x86: Rework deferred interrupt affinity logic

Thomas Gleixner lkml 1 version Applied

Status from this message: The following commit has been merged into the irq/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5ARC: Remove GENERIC_PENDING_IRQarch/arc/Kconfig arch/arc/kernel/mcip.c kernel/irq/debugfs.c+1 -32 replies
2/5hexagon: Remove GENERIC_PENDING_IRQ leftoverarch/hexagon/Kconfig+0 -11 reply
3/5genirq: Provide IRQCHIP_MOVE_DEFERREDinclude/linux/irq.h kernel/irq/Kconfig kernel/irq/chip.c+21 -30 replies
4/5x86/apic: Convert to IRQCHIP_MOVE_DEFERREDarch/x86/Kconfig arch/x86/hyperv/irqdomain.c arch/x86/kernel/apic/io_apic.c +8 more+7 -222 replies
5/5genirq: Remove IRQ_MOVE_PCNTXT and related codearch/x86/Kconfig include/linux/irq.h kernel/irq/chip.c +3 more+2 -340 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchBrian CainVineet GuptaSteve WahlWei Liu
1/5A-b
2/5A-b
3/5
4/5R-b A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [patch 0/5] genirq, x86: Rework deferred interrupt affinity logic

In a recent discussion about the potential race condition with unmaskable MSI interrupts on RISC-V:

https;//lore.kernel.org/all/87r06gq2di.ffs@tglx

it turned out that RISC-V needs the GENERIC_PENDING_IRQ infrastructure to close the gap.

It turns out that the logic behind GENERIC_PENDING_IRQ is slighly convoluted and backwards for the general case:

1) The default is to defer, which is not what the majority of interrupt controllers need.

2) Deferrement is handled as per interrupt flag. That's a pointless exercise as the requirement is actually per interrupt controller.

To ease the conversion of RISC-V, rework the logic to make the deferrement based on an interrupt chip flag and convert x86 over, which then allows to remove the current double book keeping of the non-deferrement flag.

The conversion is done in two steps with an intermediate config switch as RISC-V needs a trivial way to backport the changes.

Thanks,

tglx

---
 arch/arc/Kconfig                    |    1 -
 arch/arc/kernel/mcip.c              |    2 --
 arch/hexagon/Kconfig                |    1 -
 arch/x86/hyperv/irqdomain.c         |    2 +-
 arch/x86/kernel/apic/io_apic.c      |    2 +-
 arch/x86/kernel/apic/msi.c          |    3 ++-
 arch/x86/kernel/hpet.c              |    8 --------
 arch/x86/platform/uv/uv_irq.c       |    2 --
 drivers/iommu/amd/init.c            |    2 +-
 drivers/iommu/amd/iommu.c           |    1 -
 drivers/iommu/intel/irq_remapping.c |    1 -
 drivers/pci/controller/pci-hyperv.c |    1 +
 drivers/xen/events/events_base.c    |    6 ------
 include/linux/irq.h                 |   14 +++-----------
 kernel/irq/Kconfig                  |    4 ++++
 kernel/irq/chip.c                   |    4 +---
 kernel/irq/debugfs.c                |    2 +-
 kernel/irq/internals.h              |    2 +-
 kernel/irq/settings.h               |    6 ------
 19 files changed, 16 insertions(+), 48 deletions(-)