linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: kernel: only use i8253 clocksource with periodic clockevent
@ 2019-05-13 11:47 Thomas Bogendoerfer
  2019-07-17  9:03 ` Thomas Bogendoerfer
  2019-07-17 15:58 ` Paul Burton
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2019-05-13 11:47 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan, linux-mips, linux-kernel

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>
---
 arch/mips/kernel/i8253.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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();
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-17 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 11:47 [PATCH] MIPS: kernel: only use i8253 clocksource with periodic clockevent Thomas Bogendoerfer
2019-07-17  9:03 ` Thomas Bogendoerfer
2019-07-17 15:58 ` Paul Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).