aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorJan Glauber <jang@linux.vnet.ibm.com>2012-11-29 07:05:05 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-11-30 11:47:21 -0500
commit9a4da8a5b109906a64bed5aaeb83bf4edb1f5888 (patch)
tree2788d7c8fe3e90333555435c7539d9f31d2c520e /drivers/pci
parente56e4e87e370a0f121450d52337969aa1be21ff7 (diff)
s390/pci: PCI adapter interrupts for MSI/MSI-X
Support PCI adapter interrupts using the Single-IRQ-mode. Single-IRQ-mode disables an adapter IRQ automatically after delivering it until the SIC instruction enables it again. This is used to reduce the number of IRQs for streaming workloads. Up to 64 MSI handlers can be registered per PCI function. A hash table is used to map interrupt numbers to MSI descriptors. The interrupt vector is scanned using the flogr instruction. Only MSI/MSI-X interrupts are supported, no legacy INTs. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index a825d78fd0aa..5099636a6e5f 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -207,6 +207,8 @@ static void msix_mask_irq(struct msi_desc *desc, u32 flag)
207 desc->masked = __msix_mask_irq(desc, flag); 207 desc->masked = __msix_mask_irq(desc, flag);
208} 208}
209 209
210#ifdef CONFIG_GENERIC_HARDIRQS
211
210static void msi_set_mask_bit(struct irq_data *data, u32 flag) 212static void msi_set_mask_bit(struct irq_data *data, u32 flag)
211{ 213{
212 struct msi_desc *desc = irq_data_get_msi(data); 214 struct msi_desc *desc = irq_data_get_msi(data);
@@ -230,6 +232,8 @@ void unmask_msi_irq(struct irq_data *data)
230 msi_set_mask_bit(data, 0); 232 msi_set_mask_bit(data, 0);
231} 233}
232 234
235#endif /* CONFIG_GENERIC_HARDIRQS */
236
233void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) 237void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
234{ 238{
235 BUG_ON(entry->dev->current_state != PCI_D0); 239 BUG_ON(entry->dev->current_state != PCI_D0);
@@ -337,8 +341,10 @@ static void free_msi_irqs(struct pci_dev *dev)
337 if (!entry->irq) 341 if (!entry->irq)
338 continue; 342 continue;
339 nvec = 1 << entry->msi_attrib.multiple; 343 nvec = 1 << entry->msi_attrib.multiple;
344#ifdef CONFIG_GENERIC_HARDIRQS
340 for (i = 0; i < nvec; i++) 345 for (i = 0; i < nvec; i++)
341 BUG_ON(irq_has_action(entry->irq + i)); 346 BUG_ON(irq_has_action(entry->irq + i));
347#endif
342 } 348 }
343 349
344 arch_teardown_msi_irqs(dev); 350 arch_teardown_msi_irqs(dev);