Skip to content

Commit

Permalink
HV: remove uint64_t base from struct pci_bar
Browse files Browse the repository at this point in the history
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 <dongsheng.x.zhang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
  • Loading branch information
donsheng authored and acrnsi committed Jul 1, 2019
1 parent 5a8703f commit 84e09a2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions hypervisor/dm/vpci/pci_pt.c
Expand Up @@ -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:
Expand All @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down
1 change: 0 additions & 1 deletion hypervisor/hw/pci.c
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion hypervisor/include/hw/pci.h
Expand Up @@ -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;
Expand Down

0 comments on commit 84e09a2

Please sign in to comment.