From patchwork Wed Sep 4 17:52:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11131211 X-Patchwork-Delegate: paulburton@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B3471398 for ; Wed, 4 Sep 2019 17:59:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AE2022CF7 for ; Wed, 4 Sep 2019 17:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567619959; bh=hHHjSbiQsAjEEctleSS533vZ2M8xIgEBQTPowA2D9+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=eZ7JKSNGEORQO8Ru4K5qT/ligddaO800gALWar4OwSFG2tayMqxuEsf1fXIMgPObp y5W722Jt3d5iO+vg3jg6Xaairged9k3NxAA8irIydNm+nFM2uCzznhT9Sd1j9RxiF2 B1p1sSrd/8SNZSA4Np/9VzGBRMhjN+DJR/7zCibk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387810AbfIDR7S (ORCPT ); Wed, 4 Sep 2019 13:59:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:38090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733309AbfIDR7R (ORCPT ); Wed, 4 Sep 2019 13:59:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 071CB21883; Wed, 4 Sep 2019 17:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567619956; bh=hHHjSbiQsAjEEctleSS533vZ2M8xIgEBQTPowA2D9+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TZFeWXsFTS0tox8q4MetCL5UZ2Xpm/iyTAKpnGTITrB1k9wjxDcl3q42o7RIhoL8H 7K+F0zM1uqyIxcTJpEFY3RiHm3zV5+nlbuKHERUdNC1wCV9t11dT2/TLhoI1xsDzJ7 PL3kknrnWT63jWjjl7x3sW6QGiQTKlpfyw7q5tSQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Bogendoerfer , Paul Burton , Ralf Baechle , James Hogan , linux-mips@vger.kernel.org, Sasha Levin Subject: [PATCH 4.9 02/83] MIPS: kernel: only use i8253 clocksource with periodic clockevent Date: Wed, 4 Sep 2019 19:52:54 +0200 Message-Id: <20190904175303.776133799@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175303.488266791@linuxfoundation.org> References: <20190904175303.488266791@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org [ 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();