mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-19 18:02:06 +00:00
HV: remove the function get_bar_base()
There is no need to call get_bar_base(), as new_bar is set to val & mask, where mask is the bar size mask, so new_base has already been set to be the bar base address before get_bar_base() is called on it. Tracked-On: #3241 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
74b788988d
commit
8707834f83
@ -33,11 +33,6 @@
|
||||
#include <logmsg.h>
|
||||
#include "vpci_priv.h"
|
||||
|
||||
static inline uint32_t get_bar_base(uint32_t bar)
|
||||
{
|
||||
return bar & PCIM_BAR_MEM_BASE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @pre vdev != NULL
|
||||
* @pre vdev->vpci != NULL
|
||||
@ -215,13 +210,12 @@ static void vdev_pt_write_vbar(struct pci_vdev *vdev, uint32_t offset, uint32_t
|
||||
new_bar = val & mask;
|
||||
if (bar_update_normal) {
|
||||
if (is_msix_table_bar) {
|
||||
vdev->bar[idx].base = get_bar_base(new_bar);
|
||||
vdev->bar[idx].base = new_bar;
|
||||
vdev_pt_remap_msix_table_bar(vdev);
|
||||
} else {
|
||||
vdev_pt_remap_generic_mem_vbar(vdev, idx,
|
||||
get_bar_base(new_bar));
|
||||
vdev_pt_remap_generic_mem_vbar(vdev, idx, new_bar);
|
||||
|
||||
vdev->bar[idx].base = get_bar_base(new_bar);
|
||||
vdev->bar[idx].base = new_bar;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user