diff options
author | Thomas Bogendoerfer <tbogendoerfer@suse.de> | 2019-05-13 13:47:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-29 08:28:27 +0200 |
commit | 326175aa28fd29faf7b6554f4f370cae14155aae (patch) | |
tree | dd9879c92c7be3c8dfc641580deb041b4ecca339 /arch | |
parent | a6067c6e630f99e9b994707b5659acdecb68a34d (diff) | |
download | linux-stable-326175aa28fd29faf7b6554f4f370cae14155aae.tar.gz linux-stable-326175aa28fd29faf7b6554f4f370cae14155aae.tar.bz2 linux-stable-326175aa28fd29faf7b6554f4f370cae14155aae.zip |
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')
-rw-r--r-- | arch/mips/kernel/i8253.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c index 5f209f111e59..df7ddd246eaa 100644 --- a/arch/mips/kernel/i8253.c +++ b/arch/mips/kernel/i8253.c @@ -32,7 +32,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(); |