Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp161976ybj; Fri, 8 May 2020 08:46:33 -0700 (PDT) X-Google-Smtp-Source: APiQypKX7w9tOXTpiDhYcBGq/7NEaruVWVhPZh/ElDYtpe+STfUQL0grHd1jXNDBYz4HtcyTRXEW X-Received: by 2002:aa7:c2ce:: with SMTP id m14mr2783786edp.305.1588952792936; Fri, 08 May 2020 08:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588952792; cv=none; d=google.com; s=arc-20160816; b=0W2fUZDxVP9gA7Hssc6ejNHJccg5Tt566HmkXkCsbf32cIItp8gXla9ExGRcwRzzb0 IkaYPuC4LjDiOZuFCa1wM611xoDV+DQGgdI3DokKi+tUl0XEoHE5M/Wf3ve3GraO9tzs trJeEoSr72CKibEG84XDzIzP83Ak6N6kpJnulf7czI1OekpTQqDzkESclXeErBwcsQSu 8xFIEpZrujglKb2qFoZCwCqtnZshsGKHf8Mwd3xNXTGTCIDsWo+plKGnlMSNafrEJx/Y bAoe1TzG/8mvb7XwSzKYgPLIdZ+CCv7e9kr/VHuFTYj8NZBtxwSWybV28fyJIsGUbYhd Wctg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=t7wZ93xt6Ly7uRXe+GrfLSmdNbIr7GXtO5Onwsg0Iq0=; b=f/9Og4rLBxfcYb5xou6XLxDHLwOH+/QGETga8tDbgsA7fA70JCG+WiFCQz3hjjmw3l MUrKnfLm+ta2LJ+r3QkS/3zHJKNlj77Dfi88/7PV7A1RGV9ritDgU+hfoidw+ZpaRyMT R8EXS7w0ZV8Y2EZ6Ut1hY2ixa2Gr9XA6JVD77kdx8T0f8hSVO1sEWpYBgetBnGdHdEu2 UL0lVb+AlD2sXU7dYeG6G93tL7D8GsshF2+EjPVMArv9bI2RJ2DNu+IVavuJZkUSq2xR ujQx8uKNA2oslJiJbsqKpQN/hiefzKOT6CV0J/SE/jjF0jN2oAO2qbNd+/vnu1XRT/o5 J2WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n23si1142030edt.420.2020.05.08.08.46.09; Fri, 08 May 2020 08:46:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728367AbgEHPm1 (ORCPT + 99 others); Fri, 8 May 2020 11:42:27 -0400 Received: from elvis.franken.de ([193.175.24.41]:44985 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728282AbgEHPmZ (ORCPT ); Fri, 8 May 2020 11:42:25 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1jX58n-0005J7-01; Fri, 08 May 2020 17:42:21 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 65A77C043A; Fri, 8 May 2020 17:41:50 +0200 (CEST) Date: Fri, 8 May 2020 17:41:50 +0200 From: Thomas Bogendoerfer To: Sergey.Semin@baikalelectronics.ru Cc: Serge Semin , Alexey Malahov , Paul Burton , Ralf Baechle , Greg Kroah-Hartman , Arnd Bergmann , Rob Herring , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Vincenzo Frascino , Thomas Gleixner , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 18/20] mips: csrc-r4k: Decrease r4k-clocksource rating if CPU_FREQ enabled Message-ID: <20200508154150.GB22247@alpha.franken.de> References: <20200306124807.3596F80307C2@mail.baikalelectronics.ru> <20200506174238.15385-1-Sergey.Semin@baikalelectronics.ru> <20200506174238.15385-19-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200506174238.15385-19-Sergey.Semin@baikalelectronics.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 06, 2020 at 08:42:36PM +0300, Sergey.Semin@baikalelectronics.ru wrote: > From: Serge Semin > > Commit 07d69579e7fe ("MIPS: Don't register r4k sched clock when > CPUFREQ enabled") disabled the r4k-clock usage for scheduler ticks > counting due to the scheduler being non-tolerant for unstable > clocks sources. For the same reason the clock should be used > in the system clocksource framework only as a last resort if CPU > frequency may change. > > Signed-off-by: Serge Semin > Cc: Alexey Malahov > Cc: Thomas Bogendoerfer > Cc: Paul Burton > Cc: Ralf Baechle > Cc: Greg Kroah-Hartman > Cc: Arnd Bergmann > Cc: Rob Herring > Cc: linux-pm@vger.kernel.org > Cc: devicetree@vger.kernel.org > --- > arch/mips/kernel/csrc-r4k.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c > index 437dda64fd7a..d81fb374f477 100644 > --- a/arch/mips/kernel/csrc-r4k.c > +++ b/arch/mips/kernel/csrc-r4k.c > @@ -71,7 +71,11 @@ int __init init_r4k_clocksource(void) > return -ENXIO; > > /* Calculate a somewhat reasonable rating value */ > +#ifndef CONFIG_CPU_FREQ > clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; > +#else > + clocksource_mips.rating = 99; > +#endif I dislike this patch. Assuming you have an other clocksource, why not simply disable csrc-r4k, if CPU_FREQ is enabled ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]