Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5115230yba; Mon, 13 May 2019 05:43:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwwMlWiXngz9d/SjJoWp9wXGqnceX9o+73vH1yv0Xp3iQ3930Xxkqfv/8kUB7XdidIaLIZ X-Received: by 2002:a63:d0e:: with SMTP id c14mr30982151pgl.345.1557751422262; Mon, 13 May 2019 05:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557751422; cv=none; d=google.com; s=arc-20160816; b=MzVPrLuP2d6mYvk9YiJJwLKzTCsgZnuTL1gkMBoEwFaG6xJbqNEgfFQgtF27vqELCg Tb07ej/S4gXlOrIV4eGmCvBw9J3lDYCgq3Kvri0JBwlUW7vscdWeawC88M38Y+IlEadv xShRHL09bQ5DIhv5z8/awsPjaqmUvwPGxxADt6Y+rrB9cGVp3nXGX2sF9Er5FX1UKC3q +INcrFM73BRDxMc9+isJTCDbIaslmiNQdk31ZBNGGy4TeMuiyB6303KmSD89HJ6EE0Sk O9UIwatoOCa9o6XPko25BrrPI0nc+J3uBbBU+ZfC5ScxN49bFQJ30IHJXZyWyB9DLYTC ujUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=FEqsm3cPRzHPfhurz+E9v6sqpVzanFGvNC2DlvXQWMk=; b=PCJTMCP2AH9mS8kv+2Nd3LbToY+uePZNca+fvcuTfwuHbnKeBo+IQRDr/NYiWNpckk 7KCrYT/drSOkuKv+SxA2DfMVUiLJqwUOaMECpy54zWWXPq2cilC54JNhMPF9/JJz9jS7 HvIz8H34xg5dONAKnuJAHVOVN9CNduDTszQGl0aPhvuiiV/iwB/pG8l7nZhuduVjTdPH wrxVyrYV64dEybBLI9YlOxfojmJHAcla4gP+S1VfyOtl0TLpV3ut2eX9ML9Gyu03t1Ua b/1+Qpye/5D6SLGjXvRcjOKUIHBz94D3+bCjO0aVLiqRxCJrwCvMpJPrhKrU/Z63wjEi 95JA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x73si16816745pgx.167.2019.05.13.05.43.25; Mon, 13 May 2019 05:43:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729452AbfEMLrc (ORCPT + 99 others); Mon, 13 May 2019 07:47:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:55540 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729411AbfEMLrc (ORCPT ); Mon, 13 May 2019 07:47:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 33432AD85; Mon, 13 May 2019 11:47:31 +0000 (UTC) From: Thomas Bogendoerfer To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] MIPS: kernel: only use i8253 clocksource with periodic clockevent Date: Mon, 13 May 2019 13:47:25 +0200 Message-Id: <20190513114725.17823-1-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.13.7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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