Skip to content

Commit 9fa2eb5

Browse files
author
Herton R. Krzesinski
committed
Merge: CNB: genirq/msi: Use a named struct for PCI/MSI attributes and other PCI/MSI cleanups
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1867 This series resolves RHBZ2151246 "CNB: genirq/msi: Use a named struct for PCI/MSI attributes", which is a request from Common Network Backports (CNB) for updates in the kernel's PCI subsystem to enable networking driver updates. Some drivers have updated by skipping the structure's update - namely 'pci-hyperv' and 'ath11k'; these are now cleaned up. The target patch is commit e58f225 "genirq/msi, treewide: Use a named struct for PCI/MSI attributes" which comes from upstream merge commit 09eb3ad "Merge branch 'irq/urgent' into irq/msi" to pick up PCI/MSI-x fixes. The upstream merge commit contained lots of cleanup, refactoring, and file renames and moves, further isolating the fuctionality between the kernel's PCI and IRQ cores with respect to Message Signaled Interrupts (MSI and MSI-x). Most patches back-ported cleanly, however, there were three - 14/26, 15,/26 and 22/26 - that had conflicts which are noted within the respective patch's "commit message"s. Note that RHEL does not have MSI domain support for Power series which accounts for much of the conflicts of patch 14/26. See upstream merge commit 7cca308 (a5f3d2c powerpc/pseries/pci: Add MSI domains) which likely has pre-requisite dependencies upon upstream merge commit 7d6e3fa. Omitted-fix: 91f7d2d x86/xen: Use correct #ifdef guard for xen_initdom Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2151246 Depends: N/A Signed-off-by: Myron Stowe <mstowe@redhat.com> Approved-by: Lenny Szubowicz <lszubowi@redhat.com> Approved-by: Íñigo Huguet <ihuguet@redhat.com> Approved-by: Mohamed Gamal Morsy <mgamal@redhat.com> Approved-by: Jarod Wilson <jarod@redhat.com> Approved-by: John W. Linville <linville@redhat.com> Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2 parents cd8c93f + 762d32e commit 9fa2eb5

File tree

44 files changed

+723
-1134
lines changed

Some content is hidden

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

44 files changed

+723
-1134
lines changed

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

arch/powerpc/platforms/4xx/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ obj-y += uic.o machine_check.o
33
obj-$(CONFIG_4xx_SOC) += soc.o
44
obj-$(CONFIG_PCI) += pci.o
55
obj-$(CONFIG_PPC4xx_HSTA_MSI) += hsta_msi.o
6-
obj-$(CONFIG_PPC4xx_MSI) += msi.o
76
obj-$(CONFIG_PPC4xx_CPM) += cpm.o
87
obj-$(CONFIG_PPC4xx_GPIO) += gpio.o

0 commit comments

Comments
 (0)