From 84e09a22465b0874266e06878903f68347c7bfb7 Mon Sep 17 00:00:00 2001 From: dongshen Date: Thu, 27 Jun 2019 17:57:22 -0700 Subject: [PATCH] HV: remove uint64_t base from struct pci_bar At this point, uint64_t base in struct pci_bar is not used by any code, so we can remove it. Tracked-On: #3241 Signed-off-by: dongshen Acked-by: Eddie Dong --- hypervisor/dm/vpci/pci_pt.c | 4 ---- hypervisor/hw/pci.c | 1 - hypervisor/include/hw/pci.h | 1 - 3 files changed, 6 deletions(-) diff --git a/hypervisor/dm/vpci/pci_pt.c b/hypervisor/dm/vpci/pci_pt.c index e4082079ff..0fc3112bc1 100644 --- a/hypervisor/dm/vpci/pci_pt.c +++ b/hypervisor/dm/vpci/pci_pt.c @@ -345,7 +345,6 @@ static void vdev_pt_write_vbar(struct pci_vdev *vdev, uint32_t offset, uint32_t switch (vdev->bar[idx].type) { case PCIBAR_NONE: - vdev->bar[idx].base = 0UL; break; case PCIBAR_MEM32: @@ -356,11 +355,9 @@ static void vdev_pt_write_vbar(struct pci_vdev *vdev, uint32_t offset, uint32_t if (bar_update_normal) { if (is_msix_table_bar) { - vdev->bar[idx].base = base; vdev_pt_remap_msix_table_bar(vdev); } else { vdev_pt_remap_generic_mem_vbar(vdev, idx); - vdev->bar[idx].base = base; } } break; @@ -444,7 +441,6 @@ void init_vdev_pt(struct pci_vdev *vdev) pbar = &vdev->pdev->bar[idx]; vbar = &vdev->bar[idx]; - vbar->base = 0UL; if (is_bar_supported(pbar)) { vbar->reg.value = pbar->reg.value; vbar->reg.bits.mem.base = 0x0U; /* clear vbar base */ diff --git a/hypervisor/hw/pci.c b/hypervisor/hw/pci.c index 526f5d679a..d4b01fd790 100644 --- a/hypervisor/hw/pci.c +++ b/hypervisor/hw/pci.c @@ -286,7 +286,6 @@ static uint32_t pci_pdev_read_bar(union pci_bdf bdf, uint32_t idx, struct pci_ba } } - bar->base = base; bar->size = size; bar->type = type; diff --git a/hypervisor/include/hw/pci.h b/hypervisor/include/hw/pci.h index a879e46616..7b7944d689 100644 --- a/hypervisor/include/hw/pci.h +++ b/hypervisor/include/hw/pci.h @@ -180,7 +180,6 @@ union pci_bar_reg { }; struct pci_bar { - uint64_t base; /* Base Address Register */ union pci_bar_reg reg; uint64_t size;