Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp7239ybj; Fri, 8 May 2020 05:20:33 -0700 (PDT) X-Google-Smtp-Source: APiQypJ3T2ylw+JCgFdOoQPQkr04dXpkAnU4nUR5X40QKTJn6w47uQpctBAaqTdOwj5+CtFZuNWX X-Received: by 2002:a17:906:d0da:: with SMTP id bq26mr1595392ejb.344.1588940433541; Fri, 08 May 2020 05:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588940433; cv=none; d=google.com; s=arc-20160816; b=Hm7D0rnRRMInaggDNCf0YG4q0NxgoTruGitSanrsB2DUchAb9xPwK9nfh7x7nph5JM z7GPWYX08NQZgS9PJJ8SmB/lLhh/f8n2Q74MLwF0ccAMWr6xccTRw15ayffoIykTyz3m UkCerAbal8UO3Ip3PLmDBxgH4i6vHfZPJ2wi2jlUi6qxzO4p+yArdDTW2qBLLm7OBRfb NFWxcmx/+rVkR/xmRhPLLFC3zQ7L6oaFnorAfes58SGI5+cMZZnN2NfsamD0cc8WC5pb OdiI7yulbiti9ZTiCNy9mfvVONuwJBm4EbfVvu05FA5ljg4FRvKVesw+mGnC+oEW+UOz R04g== 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:subject:cc:to:from:date :dkim-signature; bh=IcwpjvPw+59ikbVTJpOLsLsxsp42IkaC98oeOadjiRI=; b=AtCcHLXHJ1dAgc54WcjjwLubgDZvahWz9Xp0UmvykcWcMJJzHzmZ1VIw1dO4Bw1wJZ kI88CQZtARG4UoZOhsJgBqDGQYPmwK/1u4MdiENhp5Lg+UbtC06Ezsgfm7d6jSXbzlAm 18FFa4rWOwrxzJXiwOlRcGxj5pmpikQ2nRyU1n/inv+X70P0FaMLj2uQ73HCObA80pQe LRksvPBkxDCwIKdv0Pbyq5dXGWbCBEIiR9fibpgGg5C6/dyKHLGtJlayd8KzvD2mkEh2 7UltD5TOfyr7C840C8qnuar/LwmQ8jbNvWghYFRagQAhrOBna2oB2OpwLIYAi74Be/8V gprQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=HmpjRH8U; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si798489edv.347.2020.05.08.05.20.09; Fri, 08 May 2020 05:20:33 -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; dkim=fail header.i=@flygoat.com header.s=vultr header.b=HmpjRH8U; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbgEHMP5 (ORCPT + 99 others); Fri, 8 May 2020 08:15:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726627AbgEHMP4 (ORCPT ); Fri, 8 May 2020 08:15:56 -0400 Received: from vultr.net.flygoat.com (vultr.net.flygoat.com [IPv6:2001:19f0:6001:3633:5400:2ff:fe8c:553]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4373C05BD43; Fri, 8 May 2020 05:15:56 -0700 (PDT) Received: from flygoat-x1e (unknown [IPv6:240e:e0:f181:b238:7275:17ea:845e:bb31]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 5189A2049E; Fri, 8 May 2020 12:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1588940156; bh=UlB/LTQO9GDoNBWvUvxhRQdqtyIVKakesW0HTOXtYEY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HmpjRH8UIJe/LGtE/KC4xshp8rXQyfTRgfTtU/ZHHyOip/0iU/qXM8YZ7BfFEZyFZ 6TyU+Pv5kC/pms8VXZMRefwS8Q62sa1VRbuJ6GpguxtnMeTQn/q90m7GW7Ch640bnG TZxQie1uUxnJ6m8hjCffzP5geBSOmcHc7nycjdtAxZ4Fd1ejSm/tV+sPY+QMO8zPBL N5NK6i1RD9qrGTZYE+4NxDWvjxtb1f4+yuv6iwXsXcEAbssbkKFOJMHPyPhc5kbAf3 RR4bmSjeSHIH+H8110o8qAhgZraRnYjjPjSXeDZF4fPU5h0AN8MIPrLsxmoHZ9r4ja 2Lw1Daucvo8bw== Date: Fri, 8 May 2020 20:15:34 +0800 From: Jiaxun Yang To: Cc: Thomas Bogendoerfer , Serge Semin , Alexey Malahov , Paul Burton , Ralf Baechle , Arnd Bergmann , Rob Herring , , , Greg Kroah-Hartman , Thomas Gleixner , Allison Randal , , Subject: Re: [PATCH v2 17/20] mips: Add udelay lpj numbers adjustment Message-ID: <20200508201534.2a54da17@flygoat-x1e> In-Reply-To: <20200506174238.15385-18-Sergey.Semin@baikalelectronics.ru> References: <20200306124807.3596F80307C2@mail.baikalelectronics.ru> <20200506174238.15385-1-Sergey.Semin@baikalelectronics.ru> <20200506174238.15385-18-Sergey.Semin@baikalelectronics.ru> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 May 2020 20:42:35 +0300 wrote: > From: Serge Semin > > Loops-per-jiffies is a special number which represents a number of > noop-loop cycles per CPU-scheduler quantum - jiffies. As you > understand aside from CPU-specific implementation it depends on > the CPU frequency. So when a platform has the CPU frequency fixed, > we have no problem and the current udelay interface will work > just fine. But as soon as CPU-freq driver is enabled and the cores > frequency changes, we'll end up with distorted udelay's. In order > to fix this we have to accordinly adjust the per-CPU udelay_val > (the same as the global loops_per_jiffy) number. This can be done > in the CPU-freq transition event handler. We subscribe to that event > in the MIPS arch time-inititalization method. > > Co-developed-by: Alexey Malahov > Signed-off-by: Alexey Malahov > Signed-off-by: Serge Semin > Cc: Thomas Bogendoerfer > Cc: Paul Burton > Cc: Ralf Baechle > Cc: Arnd Bergmann > Cc: Rob Herring > Cc: linux-pm@vger.kernel.org > Cc: devicetree@vger.kernel.org Reviewed-by: Jiaxun Yang That have been absent in MIPS kernel so long! Thanks. > --- [...] --- Jiaxun Yang