Skip to content

Commit bae7ae0

Browse files
committed
s390/pci: Refactor arch_setup_msi_irqs()
jira LE-2349 Rebuild_History Non-Buildable kernel-4.18.0-553.40.1.el8_10 commit-author Gerd Bayer <gbayer@linux.ibm.com> commit 5fd11b9 Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-4.18.0-553.40.1.el8_10/5fd11b96.failed Factor out adapter interrupt allocation from arch_setup_msi_irqs() in preparation for enabling registration of multiple MSIs. Code movement only, no change of functionality intended. Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> (cherry picked from commit 5fd11b9) Signed-off-by: Jonathan Maple <jmaple@ciq.com> # Conflicts: # arch/s390/pci/pci_irq.c
1 parent db6422d commit bae7ae0

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
s390/pci: Refactor arch_setup_msi_irqs()
2+
3+
jira LE-2349
4+
Rebuild_History Non-Buildable kernel-4.18.0-553.40.1.el8_10
5+
commit-author Gerd Bayer <gbayer@linux.ibm.com>
6+
commit 5fd11b96b43708f2f6e3964412c301c1bd20ec0f
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-4.18.0-553.40.1.el8_10/5fd11b96.failed
10+
11+
Factor out adapter interrupt allocation from arch_setup_msi_irqs() in
12+
preparation for enabling registration of multiple MSIs. Code movement
13+
only, no change of functionality intended.
14+
15+
Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com>
16+
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
17+
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
18+
(cherry picked from commit 5fd11b96b43708f2f6e3964412c301c1bd20ec0f)
19+
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
20+
21+
# Conflicts:
22+
# arch/s390/pci/pci_irq.c
23+
diff --cc arch/s390/pci/pci_irq.c
24+
index 192f3b104ae4,979f776b09b8..000000000000
25+
--- a/arch/s390/pci/pci_irq.c
26+
+++ b/arch/s390/pci/pci_irq.c
27+
@@@ -269,25 -268,13 +269,29 @@@ static void zpci_floating_irq_handler(s
28+
}
29+
}
30+
31+
- int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
32+
+ static int __alloc_airq(struct zpci_dev *zdev, int msi_vecs,
33+
+ unsigned long *bit)
34+
{
35+
++<<<<<<< HEAD
36+
+ struct zpci_dev *zdev = to_zpci(pdev);
37+
+ unsigned int hwirq, msi_vecs, cpu;
38+
+ unsigned long bit;
39+
+ struct msi_desc *msi;
40+
+ struct msi_msg msg;
41+
+ int rc, irq;
42+
+
43+
+ zdev->aisb = -1UL;
44+
+ zdev->msi_first_bit = -1U;
45+
+ if (type == PCI_CAP_ID_MSI && nvec > 1)
46+
+ return 1;
47+
+ msi_vecs = min_t(unsigned int, nvec, zdev->max_msi);
48+
+
49+
++=======
50+
++>>>>>>> 5fd11b96b437 (s390/pci: Refactor arch_setup_msi_irqs())
51+
if (irq_delivery == DIRECTED) {
52+
/* Allocate cpu vector bits */
53+
- bit = airq_iv_alloc(zpci_ibv[0], msi_vecs);
54+
- if (bit == -1UL)
55+
+ *bit = airq_iv_alloc(zpci_ibv[0], msi_vecs);
56+
+ if (*bit == -1UL)
57+
return -EIO;
58+
} else {
59+
/* Allocate adapter summary indicator bit */
60+
* Unmerged path arch/s390/pci/pci_irq.c

0 commit comments

Comments
 (0)