Commit 0cf98063 authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer Committed by Khalid Elmously

MIPS: kernel: only use i8253 clocksource with periodic clockevent

BugLink: https://bugs.launchpad.net/bugs/1845036

[ Upstream commit a07e3324 ]

i8253 clocksource needs a free running timer. This could only
be used, if i8253 clockevent is set up as periodic.
Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: default avatarPaul 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: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 96a56365
...@@ -31,7 +31,8 @@ void __init setup_pit_timer(void) ...@@ -31,7 +31,8 @@ void __init setup_pit_timer(void)
static int __init init_pit_clocksource(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 0;
return clocksource_i8253_init(); return clocksource_i8253_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment