[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/6] pci: Helper function for testing if an INTx rou
From: |
Alex Williamson |
Subject: |
[Qemu-devel] [PATCH 3/6] pci: Helper function for testing if an INTx route changed |
Date: |
Tue, 02 Oct 2012 13:21:54 -0600 |
User-agent: |
StGIT/0.14.3 |
Signed-off-by: Alex Williamson <address@hidden>
---
hw/pci.c | 5 +++++
hw/pci.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/hw/pci.c b/hw/pci.c
index 9cb0ad4..6adb3b7 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1102,6 +1102,11 @@ PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice
*dev, int pin)
return (PCIINTxRoute) { PCI_INTX_NOROUTE, -1 };
}
+bool pci_intx_route_changed(PCIINTxRoute *old, PCIINTxRoute *new)
+{
+ return old->mode != new->mode || old->irq != new->irq;
+}
+
void pci_bus_fire_intx_routing_notifier(PCIBus *bus)
{
PCIDevice *dev;
diff --git a/hw/pci.h b/hw/pci.h
index ed1a372..14ebb57 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -325,6 +325,7 @@ PCIBus *pci_register_bus(DeviceState *parent, const char
*name,
uint8_t devfn_min, int nirq);
void pci_bus_set_route_irq_fn(PCIBus *, pci_route_irq_fn);
PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin);
+bool pci_intx_route_changed(PCIINTxRoute *old, PCIINTxRoute *new);
void pci_bus_fire_intx_routing_notifier(PCIBus *bus);
void pci_device_set_intx_routing_notifier(PCIDevice *dev,
PCIINTxRoutingNotifier notifier);
[Qemu-devel] [PATCH 3/6] pci: Helper function for testing if an INTx route changed,
Alex Williamson <=
[Qemu-devel] [PATCH 4/6] pci-assign: Use pci_intx_route_changed(), Alex Williamson, 2012/10/02
[Qemu-devel] [PATCH 5/6] msi: Add msi_get_message(), Alex Williamson, 2012/10/02
[Qemu-devel] [PATCH 6/6] pci-assign: Use msi_get_message(), Alex Williamson, 2012/10/02
Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups, Alex Williamson, 2012/10/08