Skip to content

Commit

Permalink
ARC: make ARC_MP_PRIMARY_CPU_ID definition public
Browse files Browse the repository at this point in the history
Make ARC_MP_PRIMARY_CPU_ID definition public so it can be used in
other ARC code.

Signed-off-by: Eugeniy Paltsev <[email protected]>
Signed-off-by: Evgeniy Paltsev <[email protected]>
  • Loading branch information
evgeniy-paltsev authored and carlescufi committed Nov 28, 2022
1 parent 9304914 commit 761be25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/arc/core/arc_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include <zephyr/init.h>
#include <zephyr/irq.h>

#define MP_PRIMARY_CPU_ID 0

volatile struct {
arch_cpustart_t fn;
void *arg;
Expand Down Expand Up @@ -70,7 +68,7 @@ static void arc_connect_debug_mask_update(int cpu_num)
* MDB debugger may modify debug_select and debug_mask registers on start, so we can't
* rely on debug_select reset value.
*/
if (cpu_num != MP_PRIMARY_CPU_ID) {
if (cpu_num != ARC_MP_PRIMARY_CPU_ID) {
core_mask |= z_arc_connect_debug_select_read();
}

Expand Down Expand Up @@ -152,7 +150,7 @@ static int arc_smp_init(const struct device *dev)

if (bcr.dbg) {
/* configure inter-core debug unit if available */
arc_connect_debug_mask_update(MP_PRIMARY_CPU_ID);
arc_connect_debug_mask_update(ARC_MP_PRIMARY_CPU_ID);
}

if (bcr.ipi) {
Expand Down
2 changes: 2 additions & 0 deletions include/zephyr/arch/arc/v2/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
extern "C" {
#endif

#define ARC_MP_PRIMARY_CPU_ID 0

#ifndef _ASMLANGUAGE

extern void z_arc_firq_stack_set(void);
Expand Down

0 comments on commit 761be25

Please sign in to comment.