[tip:tools/kvm] kvm tools: pci: remove BAR 3 hangover from virtio pci msix code

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

 



Commit-ID:  46bd6986ccd629808c304208f8e2771b2802aeb8
Gitweb:     http://git.kernel.org/tip/46bd6986ccd629808c304208f8e2771b2802aeb8
Author:     Will Deacon <will.deacon@xxxxxxx>
AuthorDate: Tue, 4 Feb 2014 16:53:50 +0000
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Sun, 16 Feb 2014 21:53:00 +0200

kvm tools: pci: remove BAR 3 hangover from virtio pci msix code

Despite not being used anymore, there are still traces of BAR 3 in both
the code and comments for the virtio pci msix implementation.

This patch removes the redundant code and fixes up the comments to match
what we're actually doing.

Cc: Sasha Levin <sasha.levin@xxxxxxxxxx>
Signed-off-by: Will Deacon <will.deacon@xxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/virtio/pci.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
index 91010ca..77c933f 100644
--- a/tools/kvm/virtio/pci.c
+++ b/tools/kvm/virtio/pci.c
@@ -345,7 +345,6 @@ int virtio_pci__init(struct kvm *kvm, void *dev, struct virtio_device *vdev,
 		.capabilities		= (void *)&vpci->pci_hdr.msix - (void *)&vpci->pci_hdr,
 		.bar_size[0]		= IOPORT_SIZE,
 		.bar_size[1]		= PCI_IO_SIZE * 2,
-		.bar_size[3]		= PCI_IO_SIZE,
 	};
 
 	vpci->dev_hdr = (struct device_header) {
@@ -368,12 +367,9 @@ int virtio_pci__init(struct kvm *kvm, void *dev, struct virtio_device *vdev,
 	 */
 	vpci->pci_hdr.msix.ctrl = cpu_to_le16(VIRTIO_PCI_MAX_VQ + VIRTIO_PCI_MAX_CONFIG - 1);
 
-	/*
-	 * Both table and PBA could be mapped on the same BAR, but for now
-	 * we're not in short of BARs
-	 */
-	vpci->pci_hdr.msix.table_offset = cpu_to_le32(1); /* Use BAR 1 */
-	vpci->pci_hdr.msix.pba_offset = cpu_to_le32(1 | PCI_IO_SIZE); /* Use BAR 3 */
+	/* Both table and PBA are mapped to the same BAR (1) */
+	vpci->pci_hdr.msix.table_offset = cpu_to_le32(1);
+	vpci->pci_hdr.msix.pba_offset = cpu_to_le32(1 | PCI_IO_SIZE);
 	vpci->config_vector = 0;
 
 	r = irq__register_device(subsys_id, &pin, &line);
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux