/* the PCI Express Base Specification, Revision 2.1 2.2.8.1: INTx interrutp signaling - Rules the Implementation Note Table 2-20 0 <= pin <= 3 0 = INTA, 1 = INTB, 2 = INTC, 3 = INTD 0-origin unlike PCI interrupt pin register.  */
int pci_swizzle_map_irq_fn(PCIDevice *pci_dev, int pin)
/* the PCI Express Base Specification, Revision 2.1 2.2.8.1: INTx interrutp signaling - Rules the Implementation Note Table 2-20 0 <= pin <= 3 0 = INTA, 1 = INTB, 2 = INTC, 3 = INTD 0-origin unlike PCI interrupt pin register.  */
int pci_swizzle_map_irq_fn(PCIDevice *pci_dev, int pin)
{
    return (pin + PCI_SLOT(pci_dev->devfn)) % PCI_NUM_PINS;
}