acrn-config: move source code of IVSHMEM region name to ivshmem_cfg.h

move MACRO of IVSHMEM region name to ivshmem_cfg.h and bug fix that
avoids multiple declarations of mem_regions in ivshmem_cfg.h

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Shuang Zheng 2020-09-15 11:55:09 +08:00 committed by wenlingz
parent 67426ed69c
commit 43670b03d5
6 changed files with 19 additions and 21 deletions

View File

@ -8,7 +8,8 @@
#include <ivshmem.h>
#include <pgtable.h>
#include <pci_devices.h>
#define IVSHMEM_SHM_REGION_0 "hv:/shm_region_0"
/*
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
@ -18,12 +19,10 @@
#define IVSHMEM_DEV_NUM 2UL
/* All user defined memory regions */
struct ivshmem_shm_region mem_regions[] = {
{
.name = IVSHMEM_SHM_REGION_0,
.size = 0x200000UL, /* 2M */
#define IVSHMEM_SHM_REGIONS \
{ \
.name = IVSHMEM_SHM_REGION_0, \
.size = 0x200000UL, /* 2M */ \
},
};
#endif /* IVSHMEM_CFG_H */

View File

@ -10,7 +10,7 @@
#include <vbar_base.h>
#include <mmu.h>
#include <page.h>
#include <ivshmem.h>
#include <ivshmem_cfg.h>
/*
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for

View File

@ -8,7 +8,8 @@
#include <ivshmem.h>
#include <pgtable.h>
#include <pci_devices.h>
#define IVSHMEM_SHM_REGION_0 "hv:/shm_region_0"
/*
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
@ -18,11 +19,10 @@
#define IVSHMEM_DEV_NUM 2UL
/* All user defined memory regions */
#define IVSHMEM_SHM_REGIONS \
{ \
.name = IVSHMEM_SHM_REGION_0,\
.size = 0x200000UL, /* 2MB */\
.name = IVSHMEM_SHM_REGION_0, \
.size = 0x200000UL, /* 2M */ \
},
#endif /* IVSHMEM_CFG_H */

View File

@ -10,7 +10,7 @@
#include <vbar_base.h>
#include <mmu.h>
#include <page.h>
#include <ivshmem.h>
#include <ivshmem_cfg.h>
/*
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for

View File

@ -8,7 +8,8 @@
#include <ivshmem.h>
#include <pgtable.h>
#include <pci_devices.h>
#define IVSHMEM_SHM_REGION_0 "hv:/shm_region_0"
/*
* The IVSHMEM_SHM_SIZE is the sum of all memory regions.
@ -18,12 +19,10 @@
#define IVSHMEM_DEV_NUM 2UL
/* All user defined memory regions */
struct ivshmem_shm_region mem_regions[] = {
{
.name = IVSHMEM_SHM_REGION_0,
.size = 0x200000UL, /* 2M */
#define IVSHMEM_SHM_REGIONS \
{ \
.name = IVSHMEM_SHM_REGION_0, \
.size = 0x200000UL, /* 2M */ \
},
};
#endif /* IVSHMEM_CFG_H */

View File

@ -10,7 +10,7 @@
#include <vbar_base.h>
#include <mmu.h>
#include <page.h>
#include <ivshmem.h>
#include <ivshmem_cfg.h>
/*
* TODO: remove PTDEV macro and add DEV_PRIVINFO macro to initialize pbdf for