Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5235992ybl; Tue, 27 Aug 2019 01:17:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwapO3RBfT/m+PBdKw3uARH5AgsyhbQ2Sl4eVLLeNJPtI+y1ysgAwW5l5cA9ilsaN3Vu8+D X-Received: by 2002:a63:9d43:: with SMTP id i64mr20228556pgd.306.1566893860979; Tue, 27 Aug 2019 01:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566893860; cv=none; d=google.com; s=arc-20160816; b=tUAUKczXSRkB+shPsWWJ6Xqa15RV01eRDe+GdNMDZ6E4+g3R1wx0XqVrppnzud42aI csBsTDifUWmeOkczsbraK+rKmhCq0sO3+GAfQYsedb5qQF/fKeUFnyJ28CLn+gpJNa94 nb7MXJfuVPBJ4JYEnnMa8y6sqdAjPaTtsEI+FQNOwNs+QRWcQrgQho7B+uibU55Rk0Rj nUJwfvc9gyQD7K9BhKInbyybD1BjLWthayP3TDr2VbUOMw7B1hZ+xUau+dfzOuZrc7mS H/jss+B2s414r0aRCrY+vKutXzSjkWk2UeEoVQxcY820g1uXxfSmElSUPWYaRZTcFtFK G+jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NWgBXu/7lOn3wIGSs3nJvvgQClXTHbBmYe3Va1Lf+Ho=; b=FSOTV8eOr7CE726pB3gFoQ0Y4xHMsTaa7HDheeMboTsvwcKhxFmIaa1xVCKxa8iPxu f9iM83vA6/mXksM6E38lvpEQD1aOze9HxfOT/yCwy/MF1Jo4CgoPX3gfTlGdi0HBy9wj n6UaJLwAfx2q2HOwgAagudoGAIkizZPyh5wU4XxhDt3L02UBHS/RoGenI/rOQURnYzC0 MrUlsA4ZS7+Z0B2f6ZyKN85EhrSDra7UoxGey6V2WGfr0VX519vretS2v8GtFt0kr7TX TtY0vDivmKtHqtGtX1MSCXkR8iCzpOF+nGSuwYwB1h9Rm6pV1kqEh2+RFmMHxG3y5c9o ICYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cv16O7zk; 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 b2si11560999plz.15.2019.08.27.01.17.25; Tue, 27 Aug 2019 01:17:40 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Cv16O7zk; 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 S1730165AbfH0Hyt (ORCPT + 99 others); Tue, 27 Aug 2019 03:54:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:46482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730142AbfH0Hyq (ORCPT ); Tue, 27 Aug 2019 03:54:46 -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 C310D2173E; Tue, 27 Aug 2019 07:54:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892486; bh=cLlmmAGCVwDgnENcAsbB4Ldr9YL25YNv2N8nZLv1Zok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cv16O7zkKrHK7nM9pqjezm6a2yKxCzet+oPFHwqJcF9EMqSDVGspYCIZvW25Bt5T0 6ItlwqXzN6hhnIg6vhNGKduSVAtROtyZvYqZLZrs4tRyNzpeGz8BgNaQ0cwI5p7Xhp G8aTmQJZZzyY7ACpSWWsP2tYsuURsFutuBXkVsxw= 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.19 02/98] MIPS: kernel: only use i8253 clocksource with periodic clockevent Date: Tue, 27 Aug 2019 09:49:41 +0200 Message-Id: <20190827072718.261794938@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072718.142728620@linuxfoundation.org> References: <20190827072718.142728620@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 5f209f111e59e..df7ddd246eaac 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.20.1