mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-16 02:15:47 +00:00
kvm tools: irq: rename irq__register_device to irq__alloc_line
Since irq__register_device no longer registers a device with anything, rename it to irq__alloc_line, which better describes what is actually going on. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "arm-common/gic.h"
|
||||
|
||||
int irq__register_device(void)
|
||||
int irq__alloc_line(void)
|
||||
{
|
||||
return gic__alloc_irqnum();
|
||||
}
|
||||
|
||||
+1
-1
@@ -360,7 +360,7 @@ int pci_shmem__init(struct kvm *kvm)
|
||||
|
||||
/* Register good old INTx */
|
||||
pci_shmem_pci_device.irq_pin = 1;
|
||||
pci_shmem_pci_device.irq_line = irq__register_device();
|
||||
pci_shmem_pci_device.irq_line = irq__alloc_line();
|
||||
|
||||
/* Register MMIO space for MSI-X */
|
||||
r = ioport__register(kvm, IOPORT_EMPTY, &shmem_pci__io_ops, IOPORT_SIZE, NULL);
|
||||
|
||||
@@ -66,7 +66,7 @@ struct framebuffer *vesa__init(struct kvm *kvm)
|
||||
return ERR_PTR(r);
|
||||
|
||||
vesa_pci_device.irq_pin = 1;
|
||||
vesa_pci_device.irq_line = irq__register_device();
|
||||
vesa_pci_device.irq_line = irq__alloc_line();
|
||||
vesa_base_addr = (u16)r;
|
||||
vesa_pci_device.bar[0] = cpu_to_le32(vesa_base_addr | PCI_BASE_ADDRESS_SPACE_IO);
|
||||
device__register(&vesa_device);
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
struct kvm;
|
||||
|
||||
int irq__register_device(void);
|
||||
int irq__alloc_line(void);
|
||||
|
||||
int irq__init(struct kvm *kvm);
|
||||
int irq__exit(struct kvm *kvm);
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
* generic & cope with multiple PPC platform types.
|
||||
*/
|
||||
|
||||
int irq__register_device(void)
|
||||
int irq__alloc_line(void)
|
||||
{
|
||||
/*
|
||||
* Have I said how nasty I find this? Line should be dontcare... PHB
|
||||
|
||||
+2
-2
@@ -278,14 +278,14 @@ static int allocated_irqnum = XICS_IRQ_OFFSET;
|
||||
/*
|
||||
* xics_alloc_irqnum(): This is hacky. The problem boils down to the PCI device
|
||||
* code which just calls kvm__irq_line( .. pcidev->pci_hdr.irq_line ..) at will.
|
||||
* Each PCI device's IRQ line is allocated by irq__register_device() (which
|
||||
* Each PCI device's IRQ line is allocated by irq__alloc_line() (which
|
||||
* allocates an IRQ AND allocates a.. PCI device num..).
|
||||
*
|
||||
* In future I'd like to at least mimic some kind of 'upstream IRQ controller'
|
||||
* whereby PCI devices let their PHB know when they want to IRQ, and that
|
||||
* percolates up.
|
||||
*
|
||||
* For now, allocate a REAL xics irq number and (via irq__register_device) push
|
||||
* For now, allocate a REAL xics irq number and (via irq__alloc_line) push
|
||||
* that into the config space. 8 bits only though!
|
||||
*/
|
||||
int xics_alloc_irqnum(void)
|
||||
|
||||
+1
-1
@@ -276,7 +276,7 @@ int virtio_mmio_init(struct kvm *kvm, void *dev, struct virtio_device *vdev,
|
||||
.queue_num_max = 256,
|
||||
};
|
||||
|
||||
vmmio->irq = irq__register_device();
|
||||
vmmio->irq = irq__alloc_line();
|
||||
vmmio->dev_hdr = (struct device_header) {
|
||||
.bus_type = DEVICE_BUS_MMIO,
|
||||
.data = generate_virtio_mmio_fdt_node,
|
||||
|
||||
+1
-1
@@ -409,7 +409,7 @@ int virtio_pci__init(struct kvm *kvm, void *dev, struct virtio_device *vdev,
|
||||
vpci->features |= VIRTIO_PCI_F_SIGNAL_MSI;
|
||||
|
||||
vpci->pci_hdr.irq_pin = 1;
|
||||
vpci->pci_hdr.irq_line = irq__register_device();
|
||||
vpci->pci_hdr.irq_line = irq__alloc_line();
|
||||
r = device__register(&vpci->dev_hdr);
|
||||
if (r < 0)
|
||||
goto free_msix_mmio;
|
||||
|
||||
Reference in New Issue
Block a user