mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
HV: remove function pci_pdev_foreach()
And make other related changes accordingly: Remove pci_pdev_enumeration_cb define Create init_vdevs() to iterate through the pdev list and create vdev for each pdev Export num_pci_pdev and pci_pdev_array as globals in header file Minor cosmetic fix: Remove trailing whitespace Tracked-On: #3022 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
536c69b9ff
commit
a6503c6af3
@@ -36,8 +36,8 @@
|
||||
#include <logmsg.h>
|
||||
|
||||
static spinlock_t pci_device_lock;
|
||||
static uint32_t num_pci_pdev;
|
||||
static struct pci_pdev pci_pdev_array[CONFIG_MAX_PCI_DEV_NUM];
|
||||
uint32_t num_pci_pdev;
|
||||
struct pci_pdev pci_pdev_array[CONFIG_MAX_PCI_DEV_NUM];
|
||||
|
||||
static void init_pdev(uint16_t pbdf);
|
||||
|
||||
@@ -395,17 +395,6 @@ static void init_pdev(uint16_t pbdf)
|
||||
}
|
||||
}
|
||||
|
||||
void pci_pdev_foreach(pci_pdev_enumeration_cb cb_func, const void *ctx)
|
||||
{
|
||||
uint32_t idx;
|
||||
|
||||
for (idx = 0U; idx < num_pci_pdev; idx++) {
|
||||
if (cb_func != NULL) {
|
||||
cb_func(&pci_pdev_array[idx], ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct pci_pdev *find_pci_pdev(union pci_bdf pbdf)
|
||||
{
|
||||
struct pci_pdev *pdev = NULL;
|
||||
|
Reference in New Issue
Block a user