[arch][arm64] Implement arch_curr_cpu_num

Only 4 cpus are supported for now

Change-Id: I346b5a51cb6e29c121e7755935cd788c7ca063e3
This commit is contained in:
Arve Hjønnevåg
2015-01-30 16:36:05 -08:00
parent 97e3611e1d
commit d3eb95aaf1

View File

@@ -246,7 +246,7 @@ static inline void set_current_thread(struct thread *t)
static inline uint arch_curr_cpu_num(void)
{
return 0;
return ARM64_READ_SYSREG(mpidr_el1) & 0x3;
}
#endif // ASSEMBLY