Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1034756ybe; Wed, 4 Sep 2019 11:29:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7/BCCv2waM/yiWWTWCkITW8rkWuYjcyIbpK5ODPiO7W0Cv+2IHvUtKoSrWE+VU9oBj+i5 X-Received: by 2002:a17:902:467:: with SMTP id 94mr4730325ple.208.1567621767655; Wed, 04 Sep 2019 11:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621767; cv=none; d=google.com; s=arc-20160816; b=do0wU96D8I1QQkR4a7YehhkGzfkOi+cCWA0pGZruTZWEvcCwX3pkYT+gwFEuSSbuc9 Jp4Avq7olwjgnFvi47+T3fHP+VG1L6jfXoj8zVjT1tIflg3yKHsuYsqBtFueOmpivyRz cepCMzmbt6jfaz7xzR5ATM+hh/y/tldeg3T+J0UN6aDMYbIBhZGVupnkOz11u4IkTYJn JhOmnhEaLJs4I/TYxTLIsHOIyCqMV/NWZinHL6UyEIrUIQlxgJVPc52IpCStZBHXKEPu ZROrnK1ivOUKED8EtL1hoWTzNy4yOPb+RrK8YhYqXskVTnUwRXk9Mqk3zGhEz+b2Llc1 8wvQ== 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=Jl5+4DqSdDUgEJ1TOBuW72P07AMQrS07QoalaLADq2U=; b=VkrwzfBBxzv2IWJD9VfC7RUu3CDPKlKW4RSoPC80kLtcVzIBwfzVWzLUZuveZ/E2IZ v42NSDZsxZs4ekn2PKVP/L2LwqWMxbIpmtQ397gjO+BjkicGW/r+zd27DkO926gjmW79 05+R1Ch82BLusi/qY+aOi3dzHy+xqsT0zQZvAIRypbF0IST1Lu6MvKj87B5DLOe4WzlU bGeXBS5/k4DSsK8Qm41SEaLQr0RYx7TCOHgUuRz1LpN8PX7tenXetAKx82iYVQSVraIt lkKYve7NZda4/idZWTWZixzGLW5fUjrEhfECV1wdLBSSKU/vC5IV2H0y8m5YqhFqOlD9 6ZMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="eCeuUo/O"; 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 f23si17751020pga.449.2019.09.04.11.29.12; Wed, 04 Sep 2019 11:29:27 -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="eCeuUo/O"; 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 S1732721AbfIDRzf (ORCPT + 99 others); Wed, 4 Sep 2019 13:55:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:60634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732659AbfIDRzd (ORCPT ); Wed, 4 Sep 2019 13:55:33 -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 AA6AE22CEA; Wed, 4 Sep 2019 17:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567619732; bh=hHHjSbiQsAjEEctleSS533vZ2M8xIgEBQTPowA2D9+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCeuUo/OnwnRSc7kPZPszNJ0Kx4wBMOKS/4VKS06t4jEfWJmWqckBJPck2OUyDqcy 3ud2AWmhZLMrM+kln764gjZljwojlpVi8SMpL+DOYBvq48IT7ITIawPmQ2Ldx/gcFG VUdj2B7zUf9QpYZWlaeegfFpL6lWMtfbIfeJXqfw= 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.4 02/77] MIPS: kernel: only use i8253 clocksource with periodic clockevent Date: Wed, 4 Sep 2019 19:52:49 +0200 Message-Id: <20190904175303.589784339@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175303.317468926@linuxfoundation.org> References: <20190904175303.317468926@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 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