Skip to content

Commit ca15f74

Browse files
committed
userspace: fix cpu_is_me() for kernel context
In kernel context cpu_is_me() should return a correct result for correct multicore support. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent db214ec commit ca15f74

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • zephyr/include/sof/lib

zephyr/include/sof/lib/cpu.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ static inline bool cpu_is_primary(int id)
5555

5656
static inline bool cpu_is_me(int id)
5757
{
58-
#ifdef CONFIG_SOF_USERSPACE_LL
59-
return true;
60-
#else
61-
return id == cpu_get_id();
62-
#endif
58+
return k_is_user_context() || id == cpu_get_id();
6359
}
6460

6561
int cpu_enable_core(int id);

0 commit comments

Comments
 (0)