From 9a9d563ece8006c464588ddbba7d2a5f5024049a Mon Sep 17 00:00:00 2001 From: Alp Sayin Date: Thu, 5 Jan 2023 11:22:08 +0000 Subject: [PATCH] arch: microblaze: Add arch_inlines.h This is part of a commit set which aligns the microblaze port with main since the port is based on v3.2. Signed-off-by: Alp Sayin --- include/zephyr/arch/arch_inlines.h | 2 ++ include/zephyr/arch/microblaze/arch_inlines.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 include/zephyr/arch/microblaze/arch_inlines.h diff --git a/include/zephyr/arch/arch_inlines.h b/include/zephyr/arch/arch_inlines.h index a4173d2a95b04f5..42f532b16b834a6 100644 --- a/include/zephyr/arch/arch_inlines.h +++ b/include/zephyr/arch/arch_inlines.h @@ -32,6 +32,8 @@ #include #elif defined(CONFIG_SPARC) #include +#elif defined(CONFIG_MICROBLAZE) +#include #else #error "Unknown Architecture" #endif diff --git a/include/zephyr/arch/microblaze/arch_inlines.h b/include/zephyr/arch/microblaze/arch_inlines.h new file mode 100644 index 000000000000000..e10e2c66badf627 --- /dev/null +++ b/include/zephyr/arch/microblaze/arch_inlines.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2022 Advanced Micro Devices, Inc. (AMD) + * + * SPDX-License-Identifier: Apache-2.0 + */ + + +#ifndef ZEPHYR_INCLUDE_ARCH_MICROBLAZE_ARCH_INLINES_H +#define ZEPHYR_INCLUDE_ARCH_MICROBLAZE_ARCH_INLINES_H + +#include + +static ALWAYS_INLINE unsigned int arch_num_cpus(void) +{ + return CONFIG_MP_MAX_NUM_CPUS; +} + +#endif /* ZEPHYR_INCLUDE_ARCH_MICROBLAZE_ARCH_INLINES_H */