hw/pci: add pci wrappers for allocating and asserting irqs
commitd98f08f54e0882b4da1177345161afabb8d47d94
authorMarcel Apfelbaum <marcel.a@redhat.com>
Mon, 7 Oct 2013 07:36:35 +0000 (7 10:36 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 14 Oct 2013 14:11:44 +0000 (14 17:11 +0300)
tree6eb01653c0c0430899c085cc5bb15ab0eae353b1
parenta8a9d30bab2fae2e0ab3436fa0a40d89fbb0cf4e
hw/pci: add pci wrappers for allocating and asserting irqs

Interrupt pin is selected and saved into PCI_INTERRUPT_PIN
register during device initialization. Devices should not call
directly qemu_set_irq and specify the INTx pin on each call.

Added pci_* wrappers to replace qemu_set_irq, qemu_irq_raise,
qemu_irq_lower and qemu_irq_pulse, setting the irq
based on PCI_INTERRUPT_PIN.

Added pci_allocate_irq wrapper to be used by devices that
still need PCIDevice infrastructure to assert irqs.

Renamed a static method which was named already pci_set_irq.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci/pci.c
include/hw/pci/pci.h