arch: arc: Add _ARCH_MEM_PARTITION_ALIGN_CHECK for arc mpu v3 v6

_ARCH_MEM_PARTITION_ALIGN_CHECK was missing for arc mpu v3 and v6.
This commit add the missing macros.

Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
This commit is contained in:
Yuguo Zou 2021-10-20 15:13:53 +08:00 committed by Anas Nashif
parent 220ad1d40d
commit 4e33cd62d0

View file

@ -287,7 +287,7 @@ BUILD_ASSERT(CONFIG_PRIVILEGED_STACK_SIZE % Z_ARC_MPU_ALIGN == 0,
*/
#ifdef __CCAC__
#define IS_BUILTIN_MWDT(val) __builtin_constant_p((uintptr_t)(val))
#if CONFIG_ARC_MPU_VER == 2
#if CONFIG_ARC_MPU_VER == 2 || CONFIG_ARC_MPU_VER == 3 || CONFIG_ARC_MPU_VER == 6
#define _ARCH_MEM_PARTITION_ALIGN_CHECK(start, size) \
BUILD_ASSERT(IS_BUILTIN_MWDT(size) ? !((size) & ((size) - 1)) : 1, \
"partition size must be power of 2"); \
@ -306,7 +306,7 @@ BUILD_ASSERT(CONFIG_PRIVILEGED_STACK_SIZE % Z_ARC_MPU_ALIGN == 0,
"partition start address must align with " STRINGIFY(Z_ARC_MPU_ALIGN))
#endif
#else /* __CCAC__ */
#if CONFIG_ARC_MPU_VER == 2
#if CONFIG_ARC_MPU_VER == 2 || CONFIG_ARC_MPU_VER == 3 || CONFIG_ARC_MPU_VER == 6
#define _ARCH_MEM_PARTITION_ALIGN_CHECK(start, size) \
BUILD_ASSERT(!((size) & ((size) - 1)), \
"partition size must be power of 2"); \