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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 E4B3BC32750 for ; Wed, 14 Aug 2019 02:29:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AED1420679 for ; Wed, 14 Aug 2019 02:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565749784; bh=fDEtZsFIYm5HYRGuh/FkCw7ClI9UfM2kYm/fzPXNZ8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=00mC+QEy+rW4Xj7kfKGvHYdIFxcUL9CvtHLP5lZ8b3/rR6sLI6MXYzax/TNwOGYIh 5alLWFfzg8A8Z/VxnkngpFefz5VmqdzjAPNiF+VVeDxlUsznQKiup1ijn/u8Zmg025 AwAAu8u4HkyOQ/qXaw7VMJzDdN8ty2+o2rYBTBTE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729835AbfHNCX2 (ORCPT ); Tue, 13 Aug 2019 22:23:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:52498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729811AbfHNCX1 (ORCPT ); Tue, 13 Aug 2019 22:23:27 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3E9B520842; Wed, 14 Aug 2019 02:23:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565749407; bh=fDEtZsFIYm5HYRGuh/FkCw7ClI9UfM2kYm/fzPXNZ8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N3zL7pns6GbW7Aj2bAo0I7Ilzt1v+6BzSmDFzCbSpOTW5koEIOUS7KZ7FCqLjiUhg 6LDv/7X+FeTbG2KhvcQjU+2isez5/1LmZdw3apL3rc7UWNFKS9mWdbEL2eLNtcZBVA spG5jGICQW2Ouo7gj1rXL1MjaO3ED40xQRVQxh30= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Thomas Bogendoerfer , Paul Burton , Ralf Baechle , James Hogan , linux-mips@vger.kernel.org, Sasha Levin Subject: [PATCH AUTOSEL 4.9 02/33] MIPS: kernel: only use i8253 clocksource with periodic clockevent Date: Tue, 13 Aug 2019 22:22:52 -0400 Message-Id: <20190814022323.17111-2-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190814022323.17111-1-sashal@kernel.org> References: <20190814022323.17111-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org From: Thomas Bogendoerfer [ 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 Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Sasha Levin --- 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 c5bc344fc745c..73039746ae364 100644 --- a/arch/mips/kernel/i8253.c +++ b/arch/mips/kernel/i8253.c @@ -31,7 +31,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.20.1