Skip to content

genirq/msi, PCI/MSI: Spring cleaning - Part 2

Thomas Gleixner dmaengine linux-arm-kernel linux-iommu linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest37 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/37device: Move MSI related data into a structdrivers/base/platform-msi.c drivers/dma/ti/k3-udma.c drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +4 more+28 -211 reply
2/37device: Add device::msi_data pointer and struct msi_device_datainclude/linux/device.h include/linux/msi.h kernel/irq/msi.c+49 -13 replies
3/37PCI/MSI: Allocate MSI device data on first usedrivers/pci/msi/msi.c+15 -50 replies
4/37PCI/MSI: Use lock from msi_device_datadrivers/base/core.c drivers/pci/msi/msi.c include/linux/device.h+1 -41 reply
5/37platform-msi: Allocate MSI device data on first usedrivers/base/platform-msi.c+7 -10 replies
6/37bus: fsl-mc-msi: Allocate MSI device data on first usedrivers/bus/fsl-mc/fsl-mc-msi.c+8 -60 replies
7/37soc: ti: ti_sci_inta_msi: Allocate MSI device data on first usedrivers/soc/ti/ti_sci_inta_msi.c+4 -00 replies
8/37genirq/msi: Provide msi_device_populate/destroy_sysfs()include/linux/msi.h kernel/irq/msi.c+51 -31 reply
9/37PCI/MSI: Let the irq code handle sysfs groupsdrivers/pci/msi/irqdomain.c drivers/pci/msi/legacy.c drivers/pci/msi/msi.c +1 more+6 -260 replies
10/37platform-msi: Let the core code handle sysfs groupsdrivers/base/platform-msi.c+1 -100 replies
11/37genirq/msi: Remove the original sysfs interfacesinclude/linux/msi.h kernel/irq/msi.c+20 -450 replies
12/37platform-msi: Rename functions and clarify commentsdrivers/base/platform-msi.c drivers/irqchip/irq-mbigen.c drivers/irqchip/irq-mvebu-icu.c +1 more+30 -240 replies
13/37platform-msi: Store platform private data pointer in msi_device_datadrivers/base/platform-msi.c include/linux/msi.h+35 -490 replies
14/37genirq/msi: Consolidate MSI descriptor datainclude/linux/msi.h+2 -00 replies
15/37platform-msi: Use msi_desc::msi_indexdrivers/base/platform-msi.c drivers/dma/qcom/hidma.c drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +2 more+11 -210 replies
16/37bus: fsl-mc-msi: Use msi_desc::msi_indexdrivers/bus/fsl-mc/fsl-mc-allocator.c drivers/bus/fsl-mc/fsl-mc-msi.c include/linux/msi.h+4 -140 replies
17/37soc: ti: ti_sci_inta_msi: Use msi_desc::msi_indexdrivers/irqchip/irq-ti-sci-inta.c drivers/soc/ti/ti_sci_inta_msi.c include/linux/msi.h+6 -180 replies
18/37PCI/MSI: Use msi_desc::msi_indexarch/powerpc/platforms/pseries/msi.c arch/x86/pci/xen.c drivers/pci/msi/irqdomain.c +3 more+13 -190 replies
19/37genirq/msi: Add msi_device_data::propertiesinclude/linux/msi.h kernel/irq/msi.c+29 -00 replies
20/37PCI/MSI: Store properties in device::msi::datadrivers/pci/msi/msi.c+6 -00 replies
21/37x86/pci/XEN: Use device MSI propertiesarch/x86/pci/xen.c+2 -40 replies
22/37x86/apic/msi: Use device MSI propertiesarch/x86/kernel/apic/msi.c+1 -40 replies
23/37genirq/msi: Use device MSI propertieskernel/irq/msi.c+2 -150 replies
24/37powerpc/cell/axon_msi: Use MSI device propertiesarch/powerpc/platforms/cell/axon_msi.c+3 -30 replies
25/37powerpc/pseries/msi: Use MSI device propertiesarch/powerpc/platforms/pseries/msi.c+2 -20 replies
26/37PCI/MSI: Provide MSI_FLAG_MSIX_CONTIGUOUSdrivers/pci/msi/irqdomain.c include/linux/msi.h+16 -20 replies
27/37powerpc/pseries/msi: Let core code check for contiguous entriesarch/powerpc/platforms/pseries/msi.c+9 -230 replies
28/37genirq/msi: Provide interface to retrieve Linux interrupt numberinclude/linux/msi.h kernel/irq/msi.c+54 -00 replies
29/37PCI/MSI: Use __msi_get_virq() in pci_get_vector()drivers/pci/msi/msi.c+5 -202 replies
30/37PCI/MSI: Simplify pci_irq_get_affinity()drivers/pci/msi/msi.c+10 -160 replies
31/37dmaengine: mv_xor_v2: Get rid of msi_desc abusedrivers/dma/mv_xor_v2.c+5 -110 replies
32/37perf/smmuv3: Use msi_get_virq()drivers/perf/arm_smmuv3_pmu.c+1 -40 replies
33/37iommu/arm-smmu-v3: Use msi_get_virq()drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c+3 -169 replies
34/37mailbox: bcm-flexrm-mailbox: Rework MSI interrupt handlingdrivers/mailbox/bcm-flexrm-mailbox.c+2 -50 replies
35/37bus: fsl-mc: fsl-mc-allocator: Rework MSI handlingdrivers/bus/fsl-mc/dprc-driver.c drivers/bus/fsl-mc/fsl-mc-allocator.c drivers/bus/fsl-mc/fsl-mc-msi.c +6 more+22 -300 replies
36/37soc: ti: ti_sci_inta_msi: Get rid of ti_sci_inta_msi_get_virq()drivers/dma/ti/k3-udma-private.c drivers/dma/ti/k3-udma.c drivers/soc/ti/k3-ringacc.c +2 more+7 -240 replies
37/37dmaengine: qcom_hidma: Cleanup MSI handlingdrivers/dma/qcom/hidma.c+18 -241 reply

Reviews trailers per patch

4 of 37 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGreg Kroah-HartmanJason GunthorpeRobin MurphySinan Kaya
SeriesR-b R-b
1/37R-b
2/37R-b
3/37
4/37R-b
5/37
6/37
7/37
8/37
9/37
10/37
11/37
12/37
13/37
14/37
15/37
16/37
17/37
18/37
19/37
20/37
21/37
22/37
23/37
24/37
25/37
26/37
27/37
28/37
29/37
30/37
31/37
32/37
33/37T-b
34/37
35/37
36/37
37/37A-b

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 00/37] genirq/msi, PCI/MSI: Spring cleaning - Part 2

This is the second part of [PCI]MSI refactoring which aims to provide the ability of expanding MSI-X vectors after enabling MSI-X.

The first part of this work can be found here:

    https://lore.kernel.org/r/[email protected]

This second part has the following important changes:

1) Cleanup of the MSI related data in struct device

struct device contains at the moment various MSI related parts. Some of them (the irq domain pointer) cannot be moved out, but the rest can be allocated on first use. This is in preparation of adding more per device MSI data later on.

2) Consolidation of sysfs handling

As a first step this moves the sysfs pointer from struct msi_desc into the new per device MSI data structure where it belongs.

Later changes will cleanup this code further, but that's not possible at this point.

3) Store per device properties in the per device MSI data to avoid looking up MSI descriptors and analysing their data. Cleanup all related use cases.

4) Provide a function to retrieve the Linux interrupt number for a given MSI index similar to pci_irq_vector() and cleanup all open coded variants.

This second series is based on:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git msi-v1-part-1

and also available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git msi-v1-part-2

For the curious who can't wait for the next part to arrive the full series is available via:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git msi-v1-part-4

Thanks,

tglx

---
 arch/powerpc/platforms/cell/axon_msi.c              |    6 
 arch/powerpc/platforms/pseries/msi.c                |   38 +---
 arch/x86/kernel/apic/msi.c                          |    5 
 arch/x86/pci/xen.c                                  |    8 
 drivers/base/core.c                                 |    1 
 drivers/base/platform-msi.c                         |  152 ++++++++---------
 drivers/bus/fsl-mc/dprc-driver.c                    |    8 
 drivers/bus/fsl-mc/fsl-mc-allocator.c               |    9 -
 drivers/bus/fsl-mc/fsl-mc-msi.c                     |   26 +--
 drivers/dma/mv_xor_v2.c                             |   16 -
 drivers/dma/qcom/hidma.c                            |   44 ++---
 drivers/dma/ti/k3-udma-private.c                    |    6 
 drivers/dma/ti/k3-udma.c                            |   14 -
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c         |   23 --
 drivers/irqchip/irq-mbigen.c                        |    4 
 drivers/irqchip/irq-mvebu-icu.c                     |   12 -
 drivers/irqchip/irq-ti-sci-inta.c                   |    2 
 drivers/mailbox/bcm-flexrm-mailbox.c                |    9 -
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c    |    4 
 drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c    |    4 
 drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c |    5 
 drivers/pci/msi/irqdomain.c                         |   20 +-
 drivers/pci/msi/legacy.c                            |    6 
 drivers/pci/msi/msi.c                               |  118 +++++--------
 drivers/pci/xen-pcifront.c                          |    2 
 drivers/perf/arm_smmuv3_pmu.c                       |    5 
 drivers/soc/fsl/dpio/dpio-driver.c                  |    8 
 drivers/soc/ti/k3-ringacc.c                         |    6 
 drivers/soc/ti/ti_sci_inta_msi.c                    |   22 --
 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c              |    4 
 include/linux/device.h                              |   26 ++-
 include/linux/fsl/mc.h                              |    4 
 include/linux/msi.h                                 |  118 +++++++------
 include/linux/pci.h                                 |    1 
 include/linux/soc/ti/ti_sci_inta_msi.h              |    1 
 kernel/irq/msi.c                                    |  171 +++++++++++++++-----
 36 files changed, 463 insertions(+), 445 deletions(-)

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu