mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 20:29:40 +00:00
HV: define function bdf_is_equal() to compare bdf
Use a function to compare bdf instead and some related code cleanup Tracked-On: #2534 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -220,6 +220,14 @@ static inline uint8_t pci_devfn(uint16_t bdf)
|
||||
return (uint8_t)(bdf & 0xFFU);
|
||||
}
|
||||
|
||||
/*
|
||||
* @pre a != NULL && b != NULL
|
||||
*/
|
||||
static inline bool bdf_is_equal(const union pci_bdf *a, const union pci_bdf *b)
|
||||
{
|
||||
return (a->value == b->value);
|
||||
}
|
||||
|
||||
uint32_t pci_pdev_read_cfg(union pci_bdf bdf, uint32_t offset, uint32_t bytes);
|
||||
void pci_pdev_write_cfg(union pci_bdf bdf, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void enable_disable_pci_intx(union pci_bdf bdf, bool enable);
|
||||
|
Reference in New Issue
Block a user