soc: intel_adsp: Abstract out a prid() accessor
Useful utility. Should probably have this in the arch layer. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
bfe3f8806b
commit
2dc333d65c
1 changed files with 8 additions and 0 deletions
|
@ -264,6 +264,14 @@ bool arch_cpu_active(int cpu_num)
|
|||
return !!(cpu_mask & BIT(cpu_num));
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE uint32_t prid(void)
|
||||
{
|
||||
uint32_t prid;
|
||||
|
||||
__asm__ volatile("rsr %0, PRID" : "=r"(prid));
|
||||
return prid;
|
||||
}
|
||||
|
||||
void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
|
||||
arch_cpustart_t fn, void *arg)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue