Skip to content

Commit feb7a43

Browse files
committed
Merge tag 'irq-msi-2022-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull MSI irq updates from Thomas Gleixner: "Rework of the MSI interrupt infrastructure. This is a treewide cleanup and consolidation of MSI interrupt handling in preparation for further changes in this area which are necessary to: - address existing shortcomings in the VFIO area - support the upcoming Interrupt Message Store functionality which decouples the message store from the PCI config/MMIO space" * tag 'irq-msi-2022-01-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (94 commits) genirq/msi: Populate sysfs entry only once PCI/MSI: Unbreak pci_irq_get_affinity() genirq/msi: Convert storage to xarray genirq/msi: Simplify sysfs handling genirq/msi: Add abuse prevention comment to msi header genirq/msi: Mop up old interfaces genirq/msi: Convert to new functions genirq/msi: Make interrupt allocation less convoluted platform-msi: Simplify platform device MSI code platform-msi: Let core code handle MSI descriptors bus: fsl-mc-msi: Simplify MSI descriptor handling soc: ti: ti_sci_inta_msi: Remove ti_sci_inta_msi_domain_free_irqs() soc: ti: ti_sci_inta_msi: Rework MSI descriptor allocation NTB/msi: Convert to msi_on_each_desc() PCI: hv: Rework MSI handling powerpc/mpic_u3msi: Use msi_for_each-desc() powerpc/fsl_msi: Use msi_for_each_desc() powerpc/pasemi/msi: Convert to msi_on_each_dec() powerpc/cell/axon_msi: Convert to msi_on_each_desc() powerpc/4xx/hsta: Rework MSI handling ...
2 parents fd04899 + 74a5257 commit feb7a43

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1773
-2078
lines changed

.clang-format

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ ForEachMacros:
216216
- 'for_each_migratetype_order'
217217
- 'for_each_msi_entry'
218218
- 'for_each_msi_entry_safe'
219-
- 'for_each_msi_vector'
220219
- 'for_each_net'
221220
- 'for_each_net_continue_reverse'
222221
- 'for_each_netdev'

Documentation/driver-api/pci/pci.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ PCI Support Library
1313
.. kernel-doc:: drivers/pci/search.c
1414
:export:
1515

16-
.. kernel-doc:: drivers/pci/msi.c
16+
.. kernel-doc:: drivers/pci/msi/msi.c
1717
:export:
1818

1919
.. kernel-doc:: drivers/pci/bus.c

arch/mips/pci/msi-octeon.c

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
6868
u64 search_mask;
6969
int index;
7070

71+
if (desc->pci.msi_attrib.is_msix)
72+
return -EINVAL;
73+
7174
/*
7275
* Read the MSI config to figure out how many IRQs this device
7376
* wants. Most devices only want 1, which will give
@@ -182,35 +185,6 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
182185
return 0;
183186
}
184187

185-
int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
186-
{
187-
struct msi_desc *entry;
188-
int ret;
189-
190-
/*
191-
* MSI-X is not supported.
192-
*/
193-
if (type == PCI_CAP_ID_MSIX)
194-
return -EINVAL;
195-
196-
/*
197-
* If an architecture wants to support multiple MSI, it needs to
198-
* override arch_setup_msi_irqs()
199-
*/
200-
if (type == PCI_CAP_ID_MSI && nvec > 1)
201-
return 1;
202-
203-
for_each_pci_msi_entry(entry, dev) {
204-
ret = arch_setup_msi_irq(dev, entry);
205-
if (ret < 0)
206-
return ret;
207-
if (ret > 0)
208-
return -ENOSPC;
209-
}
210-
211-
return 0;
212-
}
213-
214188
/**
215189
* Called when a device no longer needs its MSI interrupts. All
216190
* MSI interrupts for the device are freed.

arch/powerpc/boot/dts/bluestone.dts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -366,30 +366,5 @@
366366
0x0 0x0 0x0 0x3 &UIC3 0xe 0x4 /* swizzled int C */
367367
0x0 0x0 0x0 0x4 &UIC3 0xf 0x4 /* swizzled int D */>;
368368
};
369-
370-
MSI: ppc4xx-msi@C10000000 {
371-
compatible = "amcc,ppc4xx-msi", "ppc4xx-msi";
372-
reg = < 0xC 0x10000000 0x100
373-
0xC 0x10000000 0x100>;
374-
sdr-base = <0x36C>;
375-
msi-data = <0x00004440>;
376-
msi-mask = <0x0000ffe0>;
377-
interrupts =<0 1 2 3 4 5 6 7>;
378-
interrupt-parent = <&MSI>;
379-
#interrupt-cells = <1>;
380-
#address-cells = <0>;
381-
#size-cells = <0>;
382-
msi-available-ranges = <0x0 0x100>;
383-
interrupt-map = <
384-
0 &UIC3 0x18 1
385-
1 &UIC3 0x19 1
386-
2 &UIC3 0x1A 1
387-
3 &UIC3 0x1B 1
388-
4 &UIC3 0x1C 1
389-
5 &UIC3 0x1D 1
390-
6 &UIC3 0x1E 1
391-
7 &UIC3 0x1F 1
392-
>;
393-
};
394369
};
395370
};

arch/powerpc/boot/dts/canyonlands.dts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -544,23 +544,5 @@
544544
0x0 0x0 0x0 0x3 &UIC3 0x12 0x4 /* swizzled int C */
545545
0x0 0x0 0x0 0x4 &UIC3 0x13 0x4 /* swizzled int D */>;
546546
};
547-
548-
MSI: ppc4xx-msi@C10000000 {
549-
compatible = "amcc,ppc4xx-msi", "ppc4xx-msi";
550-
reg = < 0xC 0x10000000 0x100>;
551-
sdr-base = <0x36C>;
552-
msi-data = <0x00000000>;
553-
msi-mask = <0x44440000>;
554-
interrupt-count = <3>;
555-
interrupts = <0 1 2 3>;
556-
interrupt-parent = <&UIC3>;
557-
#interrupt-cells = <1>;
558-
#address-cells = <0>;
559-
#size-cells = <0>;
560-
interrupt-map = <0 &UIC3 0x18 1
561-
1 &UIC3 0x19 1
562-
2 &UIC3 0x1A 1
563-
3 &UIC3 0x1B 1>;
564-
};
565547
};
566548
};

arch/powerpc/boot/dts/katmai.dts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -442,24 +442,6 @@
442442
0x0 0x0 0x0 0x4 &UIC3 0xb 0x4 /* swizzled int D */>;
443443
};
444444

445-
MSI: ppc4xx-msi@400300000 {
446-
compatible = "amcc,ppc4xx-msi", "ppc4xx-msi";
447-
reg = < 0x4 0x00300000 0x100>;
448-
sdr-base = <0x3B0>;
449-
msi-data = <0x00000000>;
450-
msi-mask = <0x44440000>;
451-
interrupt-count = <3>;
452-
interrupts =<0 1 2 3>;
453-
interrupt-parent = <&UIC0>;
454-
#interrupt-cells = <1>;
455-
#address-cells = <0>;
456-
#size-cells = <0>;
457-
interrupt-map = <0 &UIC0 0xC 1
458-
1 &UIC0 0x0D 1
459-
2 &UIC0 0x0E 1
460-
3 &UIC0 0x0F 1>;
461-
};
462-
463445
I2O: i2o@400100000 {
464446
compatible = "ibm,i2o-440spe";
465447
reg = <0x00000004 0x00100000 0x100>;

arch/powerpc/boot/dts/kilauea.dts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -403,33 +403,5 @@
403403
0x0 0x0 0x0 0x3 &UIC2 0xd 0x4 /* swizzled int C */
404404
0x0 0x0 0x0 0x4 &UIC2 0xe 0x4 /* swizzled int D */>;
405405
};
406-
407-
MSI: ppc4xx-msi@C10000000 {
408-
compatible = "amcc,ppc4xx-msi", "ppc4xx-msi";
409-
reg = <0xEF620000 0x100>;
410-
sdr-base = <0x4B0>;
411-
msi-data = <0x00000000>;
412-
msi-mask = <0x44440000>;
413-
interrupt-count = <12>;
414-
interrupts = <0 1 2 3 4 5 6 7 8 9 0xA 0xB 0xC 0xD>;
415-
interrupt-parent = <&UIC2>;
416-
#interrupt-cells = <1>;
417-
#address-cells = <0>;
418-
#size-cells = <0>;
419-
interrupt-map = <0 &UIC2 0x10 1
420-
1 &UIC2 0x11 1
421-
2 &UIC2 0x12 1
422-
2 &UIC2 0x13 1
423-
2 &UIC2 0x14 1
424-
2 &UIC2 0x15 1
425-
2 &UIC2 0x16 1
426-
2 &UIC2 0x17 1
427-
2 &UIC2 0x18 1
428-
2 &UIC2 0x19 1
429-
2 &UIC2 0x1A 1
430-
2 &UIC2 0x1B 1
431-
2 &UIC2 0x1C 1
432-
3 &UIC2 0x1D 1>;
433-
};
434406
};
435407
};

arch/powerpc/boot/dts/redwood.dts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -358,25 +358,6 @@
358358
0x0 0x0 0x0 0x4 &UIC3 0xb 0x4 /* swizzled int D */>;
359359
};
360360

361-
MSI: ppc4xx-msi@400300000 {
362-
compatible = "amcc,ppc4xx-msi", "ppc4xx-msi";
363-
reg = < 0x4 0x00300000 0x100
364-
0x4 0x00300000 0x100>;
365-
sdr-base = <0x3B0>;
366-
msi-data = <0x00000000>;
367-
msi-mask = <0x44440000>;
368-
interrupt-count = <3>;
369-
interrupts =<0 1 2 3>;
370-
interrupt-parent = <&UIC0>;
371-
#interrupt-cells = <1>;
372-
#address-cells = <0>;
373-
#size-cells = <0>;
374-
interrupt-map = <0 &UIC0 0xC 1
375-
1 &UIC0 0x0D 1
376-
2 &UIC0 0x0E 1
377-
3 &UIC0 0x0F 1>;
378-
};
379-
380361
};
381362

382363

arch/powerpc/platforms/40x/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ config KILAUEA
2323
select PPC4xx_PCI_EXPRESS
2424
select FORCE_PCI
2525
select PCI_MSI
26-
select PPC4xx_MSI
2726
help
2827
This option enables support for the AMCC PPC405EX evaluation board.
2928

arch/powerpc/platforms/44x/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ config BLUESTONE
2323
select APM821xx
2424
select FORCE_PCI
2525
select PCI_MSI
26-
select PPC4xx_MSI
2726
select PPC4xx_PCI_EXPRESS
2827
select IBM_EMAC_RGMII if IBM_EMAC
2928
help
@@ -73,7 +72,6 @@ config KATMAI
7372
select FORCE_PCI
7473
select PPC4xx_PCI_EXPRESS
7574
select PCI_MSI
76-
select PPC4xx_MSI
7775
help
7876
This option enables support for the AMCC PPC440SPe evaluation board.
7977

@@ -115,7 +113,6 @@ config CANYONLANDS
115113
select FORCE_PCI
116114
select PPC4xx_PCI_EXPRESS
117115
select PCI_MSI
118-
select PPC4xx_MSI
119116
select IBM_EMAC_RGMII if IBM_EMAC
120117
select IBM_EMAC_ZMII if IBM_EMAC
121118
help
@@ -141,7 +138,6 @@ config REDWOOD
141138
select FORCE_PCI
142139
select PPC4xx_PCI_EXPRESS
143140
select PCI_MSI
144-
select PPC4xx_MSI
145141
help
146142
This option enables support for the AMCC PPC460SX Redwood board.
147143

0 commit comments

Comments
 (0)