mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 20:05:14 +07:00
9a4da8a5b1
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>
23 lines
377 B
C
23 lines
377 B
C
#ifndef _HW_IRQ_H
|
|
#define _HW_IRQ_H
|
|
|
|
#include <linux/msi.h>
|
|
#include <linux/pci.h>
|
|
|
|
static inline struct msi_desc *irq_get_msi_desc(unsigned int irq)
|
|
{
|
|
return __irq_get_msi_desc(irq);
|
|
}
|
|
|
|
/* Must be called with msi map lock held */
|
|
static inline int irq_set_msi_desc(unsigned int irq, struct msi_desc *msi)
|
|
{
|
|
if (!msi)
|
|
return -EINVAL;
|
|
|
|
msi->irq = irq;
|
|
return 0;
|
|
}
|
|
|
|
#endif
|