[RFC Part4 v1 00/17] Refine support of non-PCI-compliant Message

From: Jiang Liu
Date: Sun Nov 09 2014 - 10:07:28 EST


Some interrupt controllers, such as DMAR/HPET/HT_IRQ, work almost in
the same as PCI MSI interrupt controller. And there some devices make
use of PCI MSI mechanism for non-PCI devices on ARm/ARM64 platforms.

So this patches tries to split PCI MSI code into PCI dependent part
and PCI independent part. The PCI independent part will be used to
support other PCI MSI like interrupt controllers.

Patch 1-9 are clean ups for previous hierarchy irqdomain patchset
and preparation for coming PCI MSI code reorganization.
Patch 10-15 split PCI MSI code and implement common mechanism to support
other MSI alike interrupt contollers.
Patch 16-17 converts HT_IRQ to use the common MSI support mechanism.

This patch set only solves the issue to manage interrupt controller,
but we still need another patch set to provide pci_enable_msix_range()
alike interfaces to support non-PCI devices. To achieve that, we will:
1) Move msi_list from struct pci_dev into struct device
2) Abstract common code from drivers/pci/msi.c into kernel/irq/msi.c
3) Implement msi_enable_range()/msi_disable() alike interfaces.

Apparently, we need much more time to discuss the proposal for next
patch set.

Hi Thomas and Bjorn,
Could you please to review patch 10,13 and give your thoughts?
Those are the main changes. This patch set only passes compilation and
boot tests.

Regards!
Gerry

Jiang Liu (17):
x86, irq: Normalize x86 irq_chip name
genirq: Introduce helper irq_domain_set_info() to reduce duplicated
code
x86, PCI/MSI: Simplify the way to deal with remapped MSI interrupts
PCI/MSI: Replace msi_update_msg() with irq_chip_compose_msi_msg()
PCI/MSI: Move msi_set_affinity() to PCI core
genirq: Introduce callback irq_chip.irq_write_msi_msg
x86, irq: Implement irq_chip.irq_write_msi_msg for MSI/DMAR/HPET
irq_chips
PCI/MSI: Use irq_chip.irq_write_msi_msg() to share common code
x86, irq: Simplify MSI/DMAR/HPET implementation by using common code
PCI, MSI: Split MSI code into PCI dependent and PCI independent parts
PCI, MSI: Rename __read_msi_msg() as __pci_read_msi_msg()
PCI, MSI: Rename __write_msi_msg() as __pci_write_msi_msg()
MSI: Provide irqdomain support for generic MSI
x86, PCI, MSI: Use common code to manage MSI interrupts
PCI, MSI: Clean up unused irqdomain related code
x86, htirq: Kill struct ht_irq_msg by reusing struct msi_msg
x86, htirq: Use common MSI code to manage Hypertransport interrupts

arch/powerpc/platforms/pseries/msi.c | 2 +-
arch/x86/kernel/apic/htirq.c | 137 +++++-------
arch/x86/kernel/apic/msi.c | 309 ++++++++++++---------------
arch/x86/pci/xen.c | 4 +-
arch/x86/platform/uv/uv_irq.c | 5 +-
drivers/infiniband/hw/ipath/ipath_iba6110.c | 2 +-
drivers/pci/Kconfig | 5 +-
drivers/pci/htirq.c | 20 +-
drivers/pci/msi.c | 144 ++-----------
include/linux/htirq.h | 15 +-
include/linux/irq.h | 8 +
include/linux/irqdomain.h | 4 +
include/linux/msi.h | 89 +++++---
kernel/irq/Kconfig | 10 +-
kernel/irq/Makefile | 1 +
kernel/irq/irqdomain.c | 10 +
kernel/irq/msi.c | 133 ++++++++++++
17 files changed, 454 insertions(+), 444 deletions(-)
create mode 100644 kernel/irq/msi.c

--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/