From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eddie.linux-mips.org ([148.251.95.138]:43274 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791AbcGVChR (ORCPT ); Thu, 21 Jul 2016 22:37:17 -0400 Received: from localhost.localdomain ([127.0.0.1]:58239 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S23992942AbcGVChPvVqfh (ORCPT ); Fri, 22 Jul 2016 04:37:15 +0200 Date: Fri, 22 Jul 2016 04:20:08 +0200 From: Ralf Baechle To: Huacai Chen Cc: John Crispin , "Steven J . Hill" , linux-mips@linux-mips.org, Fuxin Zhang , Zhangjin Wu , stable@vger.kernel.org Subject: Re: [PATCH 2/3] MIPS: Don't register r4k sched clock when CPUFREQ enabled Message-ID: <20160722022007.GC25689@linux-mips.org> References: <1469082471-4936-1-git-send-email-chenhc@lemote.com> <1469082471-4936-2-git-send-email-chenhc@lemote.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1469082471-4936-2-git-send-email-chenhc@lemote.com> Sender: stable-owner@vger.kernel.org List-ID: On Thu, Jul 21, 2016 at 02:27:50PM +0800, Huacai Chen wrote: > Don't register r4k sched clock when CPUFREQ enabled because sched clock > need a constant frequency. > > Cc: stable@vger.kernel.org > Signed-off-by: Huacai Chen > --- > arch/mips/kernel/csrc-r4k.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c > index 1f91056..5131b98 100644 > --- a/arch/mips/kernel/csrc-r4k.c > +++ b/arch/mips/kernel/csrc-r4k.c > @@ -82,7 +82,9 @@ int __init init_r4k_clocksource(void) > > clocksource_register_hz(&clocksource_mips, mips_hpt_frequency); > > +#ifndef CONFIG_CPUFREQ > sched_clock_register(r4k_read_sched_clock, 32, mips_hpt_frequency); > +#endif There is no config symbol CONFIG_CPUFREQ and I think if the clock may change, we shouldn't register it as csrc or cevt. Ralf