mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-10 21:02:03 -05:00
ARM: local timers: reserve local_timer_register() to SMP
When running an SMP_ON_UP enabled kernel on UP, or with nosmp passed to the kernel, we want to be able to detect that a local timer is not going to be used (local timers are only used on SMP platforms), so we could register it as a global timer instead. Return -ENXIO when the above case is detected. Signed-off-by: Marc Zyngier <[email protected]>
This commit is contained in:
parent
66f75a5d02
commit
bfa05f4f33
1 changed files with 3 additions and 0 deletions
|
|
@ -454,6 +454,9 @@ static struct local_timer_ops *lt_ops;
|
|||
#ifdef CONFIG_LOCAL_TIMERS
|
||||
int local_timer_register(struct local_timer_ops *ops)
|
||||
{
|
||||
if (!is_smp() || !setup_max_cpus)
|
||||
return -ENXIO;
|
||||
|
||||
if (lt_ops)
|
||||
return -EBUSY;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue