diff options
author | Tony Lindgren <tony@atomide.com> | 2020-05-28 08:54:53 -0700 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2020-05-28 22:50:27 +0200 |
commit | d86ad463d6706d35167418660ae3293207ee9d1c (patch) | |
tree | f9cdb4071b55b8e34e764d6d502e3a2a853e575e /arch/arm/mach-omap2/board-generic.c | |
parent | 5f55f1fb187ddb7d58bc01a68b93a5e109730378 (diff) | |
download | lwn-d86ad463d6706d35167418660ae3293207ee9d1c.tar.gz lwn-d86ad463d6706d35167418660ae3293207ee9d1c.zip |
ARM: OMAP2+: Fix regression for using local timer on non-SMP SoCs
On am437x we use also an ARM timer in addition to the dmtimer. As am437x
is not an SMP SoC, we need tick_broadcast() implemented. With the recent
dmtimer changes, Arnd started to see link failures for non-SMP am437x
configuration:
kernel/time/tick-broadcast.o: in function `tick_device_uses_broadcast':
tick-broadcast.c:(.text+0x130): undefined reference to `tick_broadcast'
Let's fix the issue by reverting dmtimer related changes that started
building timer.c only for CONFIG_SOC_HAS_REALTIME_COUNTER. We still
always need timer.c built-in for omap5 and dra7 for timer_probe().
And let's also move am437x tick_broadcast() to board-generic.c as
that's where we now call timer_probe() for am437x. This way we avoid
adding back more ifdefs to timer.c.
Fixes: 2ee04b88547a ("ARM: OMAP2+: Drop old timer code for dmtimer and 32k counter")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-omap2/board-generic.c')
-rw-r--r-- | arch/arm/mach-omap2/board-generic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index cafeb822bab7..334923d7652d 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -39,6 +39,13 @@ void __init __maybe_unused omap_init_time_of(void) timer_probe(); } +/* Used by am437x for ARM timer in non-SMP configurations */ +#if !defined(CONFIG_SMP) && defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) +void tick_broadcast(const struct cpumask *mask) +{ +} +#endif + #ifdef CONFIG_SOC_OMAP2420 static const char *const omap242x_boards_compat[] __initconst = { "ti,omap2420", |