1 /*
2  * Copyright 2022 IoT.bzh
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_ARCH_INLINES_H
8 #define ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_ARCH_INLINES_H
9 
10 #include <zephyr/kernel_structs.h>
11 
12 #ifndef CONFIG_SMP
arch_curr_cpu(void)13 static ALWAYS_INLINE _cpu_t *arch_curr_cpu(void)
14 {
15 	/* Dummy implementation always return the first cpu */
16 	return &_kernel.cpus[0];
17 }
18 #endif
19 
arch_proc_id(void)20 static ALWAYS_INLINE uint32_t arch_proc_id(void)
21 {
22 	/*
23 	 * Placeholder implementation to be replaced with an architecture
24 	 * specific call to get processor ID
25 	 */
26 	return arch_curr_cpu()->id;
27 }
28 
arch_num_cpus(void)29 static ALWAYS_INLINE unsigned int arch_num_cpus(void)
30 {
31 	return CONFIG_MP_MAX_NUM_CPUS;
32 }
33 
34 #endif /* ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_ARCH_INLINES_H */
35