Skip to content

cpu: implement cpu_is_core_enabled function#218

Merged
lgirdwood merged 1 commit intothesofproject:nextfrom
tlauda:topic/cpu_is_core_enabled
Aug 13, 2018
Merged

cpu: implement cpu_is_core_enabled function#218
lgirdwood merged 1 commit intothesofproject:nextfrom
tlauda:topic/cpu_is_core_enabled

Conversation

@tlauda
Copy link
Copy Markdown
Contributor

@tlauda tlauda commented Aug 10, 2018

Adds cpu_is_core_enabled function to check for active cores.

Signed-off-by: Tomasz Lauda tomasz.lauda@linux.intel.com

Adds cpu_is_core_enabled function to check for active cores.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Comment thread src/arch/xtensa/smp/cpu.c

int arch_cpu_is_core_enabled(int id)
{
return active_cores_mask & (1 << id);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be a static inline on xtensa ? (as on xtensa we just check a mask)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a valid point, but we have different cpu.c files for xtensa-smp and xtensa-up and the active_cores_mask needs to be static, hence not in header file. If you have some proposition how to resolve it, I can change it.

@lgirdwood lgirdwood merged commit 2530814 into thesofproject:next Aug 13, 2018
@tlauda tlauda deleted the topic/cpu_is_core_enabled branch November 22, 2019 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants