hv: move mem_regions to ivshmem.c

This is a bug fix that avoids multiple declarations of mem_regions

Tracked-On: #4853

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yuan Liu 2020-09-10 12:14:19 +08:00 committed by wenlingz
parent a46aa9db4c
commit 38e2903770
2 changed files with 8 additions and 5 deletions

View File

@ -28,6 +28,10 @@
#define IVSHMEM_IV_POS_REG 0x8U #define IVSHMEM_IV_POS_REG 0x8U
#define IVSHMEM_DOORBELL_REG 0xcU #define IVSHMEM_DOORBELL_REG 0xcU
static struct ivshmem_shm_region mem_regions[8] = {
IVSHMEM_SHM_REGIONS
};
struct ivshmem_device { struct ivshmem_device {
struct pci_vdev* pcidev; struct pci_vdev* pcidev;
union { union {

View File

@ -19,11 +19,10 @@
/* All user defined memory regions */ /* All user defined memory regions */
struct ivshmem_shm_region mem_regions[] = { #define IVSHMEM_SHM_REGIONS \
{ { \
.name = IVSHMEM_SHM_REGION_0, .name = IVSHMEM_SHM_REGION_0,\
.size = 0x200000UL, /* 2M */ .size = 0x200000UL, /* 2MB */\
}, },
};
#endif /* IVSHMEM_CFG_H */ #endif /* IVSHMEM_CFG_H */