diff mbox series

MIPS: kernel: only use i8253 clocksource with periodic clockevent

Message ID 20190513114725.17823-1-tbogendoerfer@suse.de (mailing list archive)
State Mainlined
Commit a07e3324538a989b7cdbf2c679be6a7f9df2544f
Headers show
Series MIPS: kernel: only use i8253 clocksource with periodic clockevent | expand

Commit Message

Thomas Bogendoerfer May 13, 2019, 11:47 a.m. UTC
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(-)

Comments

Thomas Bogendoerfer July 17, 2019, 9:03 a.m. UTC | #1
On Mon, May 13, 2019 at 01:47:25PM +0200, Thomas Bogendoerfer wrote:
> 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

Paul,

can you take it into 5.3 ? This fixes a boot ang on mips/jazz and
is the same as x86 does for quite some time.

Thomas.
Paul Burton July 17, 2019, 3:58 p.m. UTC | #2
Hello,

Thomas Bogendoerfer wrote:
> 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>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]
diff mbox series

Patch

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