diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-02-14 11:25:58 +0000 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2012-04-20 14:55:07 +0100 |
commit | ef90251cd421e61240c406d47a2a69959888f0d2 (patch) | |
tree | 82f774a600462ded640f5e52caa0bb8a8889b23f /arch | |
parent | d20dcaa6d6f18d6478c4a461394caeda3050a647 (diff) |
ARM: local timers: reserve local_timer_register() to SMP
When running an SMP_ON_UP emabled kernel on UP, 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 can register it as a global
timer instead.
Return -ENXIO when is_smp() returns false.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/smp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 5c884c6f5e07..3fcfe32e8d68 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -466,6 +466,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; |