From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC7A2C76192 for ; Wed, 17 Jul 2019 09:04:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8004C2077C for ; Wed, 17 Jul 2019 09:04:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725951AbfGQJEC (ORCPT ); Wed, 17 Jul 2019 05:04:02 -0400 Received: from elvis.franken.de ([193.175.24.41]:38560 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbfGQJEC (ORCPT ); Wed, 17 Jul 2019 05:04:02 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1hnfqw-0005ZZ-00; Wed, 17 Jul 2019 11:03:58 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id A00ADC12B1; Wed, 17 Jul 2019 11:03:22 +0200 (CEST) Date: Wed, 17 Jul 2019 11:03:22 +0200 From: Thomas Bogendoerfer To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: kernel: only use i8253 clocksource with periodic clockevent Message-ID: <20190717090322.GA8585@alpha.franken.de> References: <20190513114725.17823-1-tbogendoerfer@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190513114725.17823-1-tbogendoerfer@suse.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 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 > --- > 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. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]