[PATCH 11/17] kvm tools: irq: rename irq__register_device to irq__alloc_line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 tools/kvm/arm/irq.c         | 2 +-
 tools/kvm/hw/pci-shmem.c    | 2 +-
 tools/kvm/hw/vesa.c         | 2 +-
 tools/kvm/include/kvm/irq.h | 2 +-
 tools/kvm/powerpc/irq.c     | 2 +-
 tools/kvm/powerpc/xics.c    | 4 ++--
 tools/kvm/virtio/mmio.c     | 2 +-
 tools/kvm/virtio/pci.c      | 2 +-
 tools/kvm/x86/irq.c         | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/kvm/arm/irq.c b/tools/kvm/arm/irq.c
index 39d4fbc23314..a39a2c289d27 100644
--- a/tools/kvm/arm/irq.c
+++ b/tools/kvm/arm/irq.c
@@ -4,7 +4,7 @@
 
 #include "arm-common/gic.h"
 
-int irq__register_device(void)
+int irq__alloc_line(void)
 {
 	return gic__alloc_irqnum();
 }
diff --git a/tools/kvm/hw/pci-shmem.c b/tools/kvm/hw/pci-shmem.c
index c0c63223e6d9..057118332981 100644
--- a/tools/kvm/hw/pci-shmem.c
+++ b/tools/kvm/hw/pci-shmem.c
@@ -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);
diff --git a/tools/kvm/hw/vesa.c b/tools/kvm/hw/vesa.c
index f033ebed0790..c7b8e66cc531 100644
--- a/tools/kvm/hw/vesa.c
+++ b/tools/kvm/hw/vesa.c
@@ -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);
diff --git a/tools/kvm/include/kvm/irq.h b/tools/kvm/include/kvm/irq.h
index 14cf574849b3..4cec6f0f8447 100644
--- a/tools/kvm/include/kvm/irq.h
+++ b/tools/kvm/include/kvm/irq.h
@@ -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);
diff --git a/tools/kvm/powerpc/irq.c b/tools/kvm/powerpc/irq.c
index 3436ae85027f..c187d8f306f2 100644
--- a/tools/kvm/powerpc/irq.c
+++ b/tools/kvm/powerpc/irq.c
@@ -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
diff --git a/tools/kvm/powerpc/xics.c b/tools/kvm/powerpc/xics.c
index c1ef35bbe012..9dc27b8b7752 100644
--- a/tools/kvm/powerpc/xics.c
+++ b/tools/kvm/powerpc/xics.c
@@ -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)
diff --git a/tools/kvm/virtio/mmio.c b/tools/kvm/virtio/mmio.c
index a8212bacd599..1cb186b452e6 100644
--- a/tools/kvm/virtio/mmio.c
+++ b/tools/kvm/virtio/mmio.c
@@ -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,
diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
index 8005e17195d9..dbd67580fb03 100644
--- a/tools/kvm/virtio/pci.c
+++ b/tools/kvm/virtio/pci.c
@@ -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;
diff --git a/tools/kvm/x86/irq.c b/tools/kvm/x86/irq.c
index 2c7606998926..5bd6aa42987e 100644
--- a/tools/kvm/x86/irq.c
+++ b/tools/kvm/x86/irq.c
@@ -39,7 +39,7 @@ static int irq__add_routing(u32 gsi, u32 type, u32 irqchip, u32 pin)
 	return 0;
 }
 
-int irq__register_device(void)
+int irq__alloc_line(void)
 {
 	return next_line++;
 }
-- 
1.8.2.2

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux