[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/52] pci: Export the pci_intx() function
From: |
Michael S. Tsirkin |
Subject: |
[PULL 23/52] pci: Export the pci_intx() function |
Date: |
Thu, 6 Jan 2022 08:17:17 -0500 |
From: Frederic Barrat <fbarrat@linux.ibm.com>
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>
---
include/hw/pci/pci.h | 5 +++++
hw/pci/pci.c | 5 -----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 5b36334a28..483d5c7c72 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);
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 322ba450e7..5d30f9ca60 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1497,11 +1497,6 @@ static void pci_irq_handler(void *opaque, int irq_num,
int level)
pci_change_irq_level(pci_dev, irq_num, change);
}
-static inline int pci_intx(PCIDevice *pci_dev)
-{
- return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1;
-}
-
qemu_irq pci_allocate_irq(PCIDevice *pci_dev)
{
int intx = pci_intx(pci_dev);
--
MST
- [PULL 11/52] virtio-mmio: add support for configure interrupt, (continued)
- [PULL 11/52] virtio-mmio: add support for configure interrupt, Michael S. Tsirkin, 2022/01/06
- [PULL 13/52] trace-events,pci: unify trace events format, Michael S. Tsirkin, 2022/01/06
- [PULL 14/52] vhost-user-blk: reconnect on any error during realize, Michael S. Tsirkin, 2022/01/06
- [PULL 16/52] chardev/char-socket: tcp_chr_sync_read: don't clobber errno, Michael S. Tsirkin, 2022/01/06
- [PULL 15/52] chardev/char-socket: tcp_chr_recv: don't clobber errno, Michael S. Tsirkin, 2022/01/06
- [PULL 17/52] vhost-backend: avoid overflow on memslots_limit, Michael S. Tsirkin, 2022/01/06
- [PULL 19/52] vhost-vdpa: stick to -errno error return convention, Michael S. Tsirkin, 2022/01/06
- [PULL 20/52] vhost-user: stick to -errno error return convention, Michael S. Tsirkin, 2022/01/06
- [PULL 22/52] vhost-user-blk: propagate error return from generic vhost, Michael S. Tsirkin, 2022/01/06
- [PULL 18/52] vhost-backend: stick to -errno error return convention, Michael S. Tsirkin, 2022/01/06
- [PULL 23/52] pci: Export the pci_intx() function,
Michael S. Tsirkin <=
- [PULL 25/52] smbios: Rename SMBIOS_ENTRY_POINT_* enums, Michael S. Tsirkin, 2022/01/06
- [PULL 21/52] vhost: stick to -errno error return convention, Michael S. Tsirkin, 2022/01/06
- [PULL 26/52] hw/smbios: Use qapi for SmbiosEntryPointType, Michael S. Tsirkin, 2022/01/06
- [PULL 37/52] virtio: signal after wrapping packed used_idx, Michael S. Tsirkin, 2022/01/06
- [PULL 36/52] virtio-mem: Support "prealloc=on" option, Michael S. Tsirkin, 2022/01/06
- [PULL 28/52] hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device, Michael S. Tsirkin, 2022/01/06
- [PULL 33/52] util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE, Michael S. Tsirkin, 2022/01/06
- [PULL 40/52] virtio-mem: Support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE, Michael S. Tsirkin, 2022/01/06
- [PULL 27/52] hw/i386: expose a "smbios-entry-point-type" PC machine property, Michael S. Tsirkin, 2022/01/06
- [PULL 24/52] pcie_aer: Don't trigger a LSI if none are defined, Michael S. Tsirkin, 2022/01/06