mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-09 02:24:45 +00:00
HV: remove all CONFIG_PARTITION_MODE from dm/vpci code
Instead of using CONFIG_PARTITION_MODE at compile time to compile in and call the partition mode/sharing mode specific functions, always compile in all sharing mode and partition code, then calling the corresponding functions dynamically based on vm type (PRE_LAUNCHED_VM and SOS_VM) at runtime. Some misra c fix: Add @pre for functions Add const to function parameters Add ASSERT in pci_cfgdata_io_read and pci_cfgdata_io_write Tracked-On: #2534 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
691468a361
commit
c6a60dd29c
@@ -67,7 +67,6 @@ static inline void pci_vdev_write_cfg_u32(struct pci_vdev *vdev, uint32_t offset
|
||||
vdev->cfgdata.data_32[offset >> 2U] = val;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
void vdev_hostbridge_init(struct pci_vdev *vdev);
|
||||
int32_t vdev_hostbridge_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
int32_t vdev_hostbridge_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
@@ -78,7 +77,6 @@ int32_t vdev_pt_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t b
|
||||
int32_t vdev_pt_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void vdev_pt_deinit(const struct pci_vdev *vdev);
|
||||
|
||||
#else
|
||||
void vmsi_init(struct pci_vdev *vdev);
|
||||
int32_t vmsi_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
int32_t vmsi_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
@@ -87,7 +85,6 @@ void vmsix_init(struct pci_vdev *vdev);
|
||||
int32_t vmsix_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
int32_t vmsix_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void vmsix_deinit(const struct pci_vdev *vdev);
|
||||
#endif
|
||||
|
||||
uint32_t pci_vdev_read_cfg(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes);
|
||||
void pci_vdev_write_cfg(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
|
||||
Reference in New Issue
Block a user