summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/i8253.c
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-05-13 13:47:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-06 10:18:04 +0200
commitafbd69c7c6ce24af5a8165da74b41a7fcb00d0ef (patch)
treec08042238196fce8750e2a5bea7ee71cf6a2dd5f /arch/mips/kernel/i8253.c
parent4322f947c6f5a28cfb388a919a668ddf983080b4 (diff)
MIPS: kernel: only use i8253 clocksource with periodic clockevent
[ Upstream commit a07e3324538a989b7cdbf2c679be6a7f9df2544f ] i8253 clocksource needs a free running timer. This could only be used, if i8253 clockevent is set up as periodic. Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/mips/kernel/i8253.c')
-rw-r--r--arch/mips/kernel/i8253.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index c5bc344fc745..73039746ae36 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -31,7 +31,8 @@ void __init setup_pit_timer(void)
static int __init init_pit_clocksource(void)
{
- if (num_possible_cpus() > 1) /* PIT does not scale! */
+ if (num_possible_cpus() > 1 || /* PIT does not scale! */
+ !clockevent_state_periodic(&i8253_clockevent))
return 0;
return clocksource_i8253_init();