Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp29420ybj; Wed, 6 May 2020 10:49:27 -0700 (PDT) X-Google-Smtp-Source: APiQypJci8+peGUVfm974Z8kDvc2/e+ZEyJteaQSRffx0igs/Vr0EwCCPHTfpjAtWl54cJgZe8c1 X-Received: by 2002:a17:906:4714:: with SMTP id y20mr8819071ejq.5.1588787367055; Wed, 06 May 2020 10:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588787367; cv=none; d=google.com; s=arc-20160816; b=X7T/2EfHcmHvokXKzoeBzKy5wM02dwNu6Fn9Ka9Qa1i3HoZrlMxHrJkGlntRZDlu2u ZkEwze8LielrYQh5ZXIR7eceUQh9RwHuNAsO2V5HGPNWju2okJIie7/0cLdw4aq8XD4f nSy8wYYJEzbLBegsAcAP13uXBOcVj9VkyyVwI0OvH/GyfGFrJQyMe3mpjah52soRmp/h hBCB/o+uls5l2i21I0LqVk6YvBZJlz2eTNQ5S6voLMkjPQqlaS3pKWDrLkYHz/7j3B8x 7259cbPqRUBA2KXJwyDq997F66TYlvCn6QOnMe1/+c0xTG/LhTWTMGF77hjdmEodPXOx NutA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qNod6XHZXw6vTfk3s5ZtY4CLCMgM7JuQfV+2GC2hF4o=; b=tUbvwxsPVGDtrc6NwHxngZdYCXChMxh3jraDb+9pE6VG5ZiAindemJiZ/FzXw/8Yur H6bA4THf7eUlItWkrScZ/7hb4mlKrttoqTs8Gx1gMCMPeyosYDiFnuMQsPYtlVoippzy SIwSy1BQz1c1UwMx/lVFOC5xmnZowObuImOthPHtMQNr2LS4jH2uQQ3H75wOXOmMUxFf IlB+VCEbU0ssZALPmUiPkAoiczlBnSGN0ZFILBxRR5cNu4DUMSezCxVPzmzz0vvIrLQW hpauB/Rkux1xT64fXpj4yIFvz87F+9+oe40BeztDQxI3KqOnov5ILcJrSvl0D0OqIW4H T9Gw== 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 q20si1453027edb.36.2020.05.06.10.49.03; Wed, 06 May 2020 10:49:27 -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 S1729939AbgEFRpA (ORCPT + 99 others); Wed, 6 May 2020 13:45:00 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:32938 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730302AbgEFRoa (ORCPT ); Wed, 6 May 2020 13:44:30 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id AB0F08000B83; Wed, 6 May 2020 17:44:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B_9z6KI_Q5VF; Wed, 6 May 2020 20:44:25 +0300 (MSK) From: To: Thomas Bogendoerfer CC: Serge Semin , Serge Semin , Alexey Malahov , Paul Burton , Ralf Baechle , Greg Kroah-Hartman , Arnd Bergmann , Rob Herring , , , Vincenzo Frascino , Thomas Gleixner , , Subject: [PATCH v2 18/20] mips: csrc-r4k: Decrease r4k-clocksource rating if CPU_FREQ enabled Date: Wed, 6 May 2020 20:42:36 +0300 Message-ID: <20200506174238.15385-19-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20200506174238.15385-1-Sergey.Semin@baikalelectronics.ru> References: <20200306124807.3596F80307C2@mail.baikalelectronics.ru> <20200506174238.15385-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 /* * R2 onwards makes the count accessible to user mode so it can be used -- 2.25.1