diff options
author | Frederic Barrat <fbarrat@linux.ibm.com> | 2021-11-16 18:01:32 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-01-07 05:19:55 -0500 |
commit | 2fedf46e34d2377760b2d26cf85487b772bca6fa (patch) | |
tree | 439264ac449faed30fb76051adb07feea555a587 /include | |
parent | fb767859345506d747876c23d181155b183f8e94 (diff) | |
download | qemu-2fedf46e34d2377760b2d26cf85487b772bca6fa.zip qemu-2fedf46e34d2377760b2d26cf85487b772bca6fa.tar.gz qemu-2fedf46e34d2377760b2d26cf85487b772bca6fa.tar.bz2 |
pci: Export the pci_intx() function
Move the pci_intx() definition to the PCI header file, so that it can
be called from other PCI files. It is used by the next patch.
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Message-Id: <20211116170133.724751-3-fbarrat@linux.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/pci/pci.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 5b36334..483d5c7 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -735,6 +735,11 @@ void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev); qemu_irq pci_allocate_irq(PCIDevice *pci_dev); void pci_set_irq(PCIDevice *pci_dev, int level); +static inline int pci_intx(PCIDevice *pci_dev) +{ + return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1; +} + static inline void pci_irq_assert(PCIDevice *pci_dev) { pci_set_irq(pci_dev, 1); |