[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 23/55] pci: Export the pci_intx() function
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 23/55] pci: Export the pci_intx() function |
Date: |
Fri, 7 Jan 2022 06:04:12 -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 v2 13/55] trace-events,pci: unify trace events format, (continued)
- [PULL v2 13/55] trace-events,pci: unify trace events format, Michael S. Tsirkin, 2022/01/07
- [PULL v2 14/55] vhost-user-blk: reconnect on any error during realize, Michael S. Tsirkin, 2022/01/07
- [PULL v2 15/55] chardev/char-socket: tcp_chr_recv: don't clobber errno, Michael S. Tsirkin, 2022/01/07
- [PULL v2 16/55] chardev/char-socket: tcp_chr_sync_read: don't clobber errno, Michael S. Tsirkin, 2022/01/07
- [PULL v2 17/55] vhost-backend: avoid overflow on memslots_limit, Michael S. Tsirkin, 2022/01/07
- [PULL v2 19/55] vhost-vdpa: stick to -errno error return convention, Michael S. Tsirkin, 2022/01/07
- [PULL v2 18/55] vhost-backend: stick to -errno error return convention, Michael S. Tsirkin, 2022/01/07
- [PULL v2 20/55] vhost-user: stick to -errno error return convention, Michael S. Tsirkin, 2022/01/07
- [PULL v2 21/55] vhost: stick to -errno error return convention, Michael S. Tsirkin, 2022/01/07
- [PULL v2 22/55] vhost-user-blk: propagate error return from generic vhost, Michael S. Tsirkin, 2022/01/07
- [PULL v2 23/55] pci: Export the pci_intx() function,
Michael S. Tsirkin <=
- [PULL v2 24/55] pcie_aer: Don't trigger a LSI if none are defined, Michael S. Tsirkin, 2022/01/07
- [PULL v2 26/55] hw/smbios: Use qapi for SmbiosEntryPointType, Michael S. Tsirkin, 2022/01/07
- [PULL v2 25/55] smbios: Rename SMBIOS_ENTRY_POINT_* enums, Michael S. Tsirkin, 2022/01/07
- [PULL v2 28/55] hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device, Michael S. Tsirkin, 2022/01/07
- [PULL v2 29/55] util/oslib-posix: Let touch_all_pages() return an error, Michael S. Tsirkin, 2022/01/07
- [PULL v2 27/55] hw/i386: expose a "smbios-entry-point-type" PC machine property, Michael S. Tsirkin, 2022/01/07
- [PULL v2 31/55] util/oslib-posix: Introduce and use MemsetContext for touch_all_pages(), Michael S. Tsirkin, 2022/01/07
- [PULL v2 30/55] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc(), Michael S. Tsirkin, 2022/01/07
- [PULL v2 32/55] util/oslib-posix: Don't create too many threads with small memory or little pages, Michael S. Tsirkin, 2022/01/07
- [PULL v2 33/55] util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE, Michael S. Tsirkin, 2022/01/07