diff --git a/kernel/base/include/los_vm_zone.h b/kernel/base/include/los_vm_zone.h index 0292effd..0baba0a2 100644 --- a/kernel/base/include/los_vm_zone.h +++ b/kernel/base/include/los_vm_zone.h @@ -40,11 +40,11 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ -#define DEFINE_(X) X##U -#define DEFINE(X) DEFINE_(X) +#define _U32_C(X) X##U +#define U32_C(X) _U32_C(X) -#define KERNEL_VMM_BASE DEFINE(KERNEL_VADDR_BASE) -#define KERNEL_VMM_SIZE DEFINE(KERNEL_VADDR_SIZE) +#define KERNEL_VMM_BASE U32_C(KERNEL_VADDR_BASE) +#define KERNEL_VMM_SIZE U32_C(KERNEL_VADDR_SIZE) #define KERNEL_ASPACE_BASE KERNEL_VMM_BASE #define KERNEL_ASPACE_SIZE KERNEL_VMM_SIZE @@ -57,11 +57,11 @@ extern "C" { #define VMALLOC_SIZE 0x08000000 #define PERIPH_DEVICE_BASE (VMALLOC_START + VMALLOC_SIZE) -#define PERIPH_DEVICE_SIZE PERIPH_PMM_SIZE +#define PERIPH_DEVICE_SIZE U32_C(PERIPH_PMM_SIZE) #define PERIPH_CACHED_BASE (PERIPH_DEVICE_BASE + PERIPH_DEVICE_SIZE) -#define PERIPH_CACHED_SIZE PERIPH_PMM_SIZE +#define PERIPH_CACHED_SIZE U32_C(PERIPH_PMM_SIZE) #define PERIPH_UNCACHED_BASE (PERIPH_CACHED_BASE + PERIPH_CACHED_SIZE) -#define PERIPH_UNCACHED_SIZE PERIPH_PMM_SIZE +#define PERIPH_UNCACHED_SIZE U32_C(PERIPH_PMM_SIZE) #define IO_DEVICE_ADDR(paddr) (paddr - PERIPH_PMM_BASE + PERIPH_DEVICE_BASE) #define IO_CACHED_ADDR(paddr) (paddr - PERIPH_PMM_BASE + PERIPH_CACHED_BASE)