linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Anders Trier Olesen <anders.trier.olesen@gmail.com>
To: "Pali Rohár" <pali@kernel.org>,
	"Gregory Clement" <gregory.clement@bootlin.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org
Cc: "Marek Behún" <kabel@kernel.org>,
	"Tomasz Maciej Nowak" <tmn505@gmail.com>,
	"Luka Perkov" <luka.perkov@sartura.hr>,
	"Andre Heider" <a.heider@gmail.com>,
	"Vladimir Vid" <vladimir.vid@sartura.hr>,
	"Russell King" <rmk+kernel@armlinux.org.uk>,
	"Gérald Kerma" <gerald@gk2.net>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Konstantin Porotchkin" <kostap@marvell.com>
Subject: Re: [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz
Date: Wed, 3 Feb 2021 20:29:23 +0100	[thread overview]
Message-ID: <cf766197-666f-3d7d-3b9e-ba512619004e@gmail.com> (raw)
In-Reply-To: <20210114124032.12765-1-pali@kernel.org>

Hi Marek & Pali

On 1/14/21 1:40 PM, Pali Rohár wrote:
> Hello!
> 
> The armada-37xx-cpufreq driver changes base CPU speed from 1000 MHz to
> 800 MHz on EspressoBIN and Turris MOX. The commit message in patch 2/10
> explains why and how can this be discovered.
> 
> That patch 2/10 led us to discover another bug, in the SOC itself,
> that causes the CPU to behave weirdly when frequency changes to 1 GHz.
> A similar erratum is documented by Marvell but only for systems where
> base frequency is 1.2 GHz.
> 
> We've discovered that to make cpufreq scaling stable on Armada 3720
> systems with base frequency 1 GHz, we also have to set voltage levels
> for L0 and L1 loads to at least 1108 mV. We were led to this by patch we
> found in Marvell kernel fork. Fix is in the patch 4/10.
> 
> https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/dc33b62c90696afb6adc7dbcc4ebbd48bedec269
> 
> During fixing this voltage issue for 1 GHz we discovered another bug in
> armada-37xx-cpufreq driver that causes CPU instability. Erratum for VDD
> stabilization was improperly implemented, details are in patch 6/10.
> 
> This patch series is also available in my git tree in branch a3720-cpufreq-issues:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/pali/linux.git/log/?h=a3720-cpufreq-issues
> 
> We have tested this patch series on Espressobin v5 and Turris MOX
> boards. If you have other Armada 3720 boards (Espressobin v5/v7, uDPU,
> Devel Board, ...) then it will be nice to do an additional tests and
> check if instability issues are finally fixed.
> 
> There is a discussion on armbian forum that Espressobin v7 is unstable
> when running at 1 GHz and in this thread was also mentioned above
> voltage patch from Marvell kernel fork:
> 
> https://forum.armbian.com/topic/10429-how-to-make-espressobin-v7-stable/
> 
> Marek & Pali
> 
> 
> Marek Behún (3):
>    arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node
>    cpufreq: armada-37xx: Fix setting TBG parent for load levels
>    clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM
>      clock
> 
> Pali Rohár (7):
>    cpufreq: armada-37xx: Fix the AVS value for loads L0 and L1
>    clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to
>      1 GHz
>    clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1
>      to L0
>    cpufreq: armada-37xx: Fix driver cleanup when registration failed
>    cpufreq: armada-37xx: Fix determining base CPU frequency
>    cpufreq: armada-37xx: Remove cur_frequency variable
>    cpufreq: armada-37xx: Fix module unloading
> 
>   arch/arm64/boot/dts/marvell/armada-37xx.dtsi |   3 +-
>   drivers/clk/mvebu/armada-37xx-periph.c       |  83 ++++++++-------
>   drivers/cpufreq/armada-37xx-cpufreq.c        | 100 ++++++++++++++-----
>   3 files changed, 124 insertions(+), 62 deletions(-)
> 

Thank you for looking at this problem!

I have tested your a3720-cpufreq-issues branch on my Espressobin v7 (1GB 
variant) with the ondemand governor. No issues so far.

root@espressobin:~# uname -a
Linux espressobin 5.11.0-rc1+ #1 SMP PREEMPT Sun Jan 31 23:35:17 CET
2021 aarch64 aarch64 aarch64 GNU/Linux
root@espressobin:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
    driver: cpufreq-dt
    CPUs which run at the same hardware frequency: 0 1
    CPUs which need to have their frequency coordinated by software: 0 1
    maximum transition latency: 0.97 ms.
    hardware limits: 200 MHz - 1000 MHz
    available frequency steps: 200 MHz, 250 MHz, 500 MHz, 1000 MHz
    available cpufreq governors: conservative, ondemand, userspace,
powersave, performance, schedutil
    current policy: frequency should be within 200 MHz and 1000 MHz.
                    The governor "ondemand" may decide which speed to use
                    within this range.
    current CPU frequency is 1000 MHz (asserted by call to hardware).
    cpufreq stats: 200 MHz:34.71%, 250 MHz:13.20%, 500 MHz:6.26%, 1000
MHz:45.83%  (2015)
analyzing CPU 1:
    driver: cpufreq-dt
    CPUs which run at the same hardware frequency: 0 1
    CPUs which need to have their frequency coordinated by software: 0 1
    maximum transition latency: 0.97 ms.
    hardware limits: 200 MHz - 1000 MHz
    available frequency steps: 200 MHz, 250 MHz, 500 MHz, 1000 MHz
    available cpufreq governors: conservative, ondemand, userspace,
powersave, performance, schedutil
    current policy: frequency should be within 200 MHz and 1000 MHz.
                    The governor "ondemand" may decide which speed to use
                    within this range.
    current CPU frequency is 500 MHz (asserted by call to hardware).
    cpufreq stats: 200 MHz:34.71%, 250 MHz:13.20%, 500 MHz:6.26%, 1000
MHz:45.83%  (2015)

root@espressobin:~# 7za b

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2
CPUs LE)

LE
CPU Freq:   974   997   993   996   997   997   996   997

RAM size:     983 MB,  # CPU hardware threads:   2
RAM usage:    441 MB,  # Benchmark threads:      2

                         Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
           KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:        879   153    560    856  |      21904   199    941   1870
23:        871   154    576    888  |      21518   199    938   1863
24:        863   154    603    928  |      21147   199    935   1857
25:        857   154    634    979  |      20885   199    934   1859
----------------------------------  | ------------------------------
Avr:             154    593    913  |              199    937   1862
Tot:             176    765   1387


Tested-by: Anders Trier Olesen <anders.trier.olesen@gmail.com>

Thanks,
Anders Trier Olesen

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-02-03 19:30 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 12:40 [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz Pali Rohár
2021-01-14 12:40 ` [PATCH mvebu v2 01/10] arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node Pali Rohár
2021-04-02 19:50   ` Gregory CLEMENT
2021-01-14 12:40 ` [PATCH mvebu v2 02/10] cpufreq: armada-37xx: Fix setting TBG parent for load levels Pali Rohár
2021-01-14 12:40 ` [PATCH mvebu v2 03/10] clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock Pali Rohár
2021-02-10  1:58   ` Stephen Boyd
2021-01-14 12:40 ` [PATCH mvebu v2 04/10] cpufreq: armada-37xx: Fix the AVS value for loads L0 and L1 Pali Rohár
2021-01-14 12:40 ` [PATCH mvebu v2 05/10] clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz Pali Rohár
2021-02-10  1:58   ` Stephen Boyd
2021-01-14 12:40 ` [PATCH mvebu v2 06/10] clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0 Pali Rohár
2021-02-10  1:58   ` Stephen Boyd
2021-01-14 12:40 ` [PATCH mvebu v2 07/10] cpufreq: armada-37xx: Fix driver cleanup when registration failed Pali Rohár
2021-01-14 12:40 ` [PATCH mvebu v2 08/10] cpufreq: armada-37xx: Fix determining base CPU frequency Pali Rohár
2021-01-14 12:40 ` [PATCH mvebu v2 09/10] cpufreq: armada-37xx: Remove cur_frequency variable Pali Rohár
2021-03-29 15:00   ` Gregory CLEMENT
2021-03-29 21:44     ` Marek Behún
2021-01-14 12:40 ` [PATCH mvebu v2 10/10] cpufreq: armada-37xx: Fix module unloading Pali Rohár
2021-02-01 14:35 ` [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz Tomasz Maciej Nowak
2021-02-03 19:29 ` Anders Trier Olesen [this message]
2021-02-22 19:41 ` [PATCH mvebu v3 " Pali Rohár
2021-02-22 19:41   ` [PATCH mvebu v3 01/10] arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node Pali Rohár
2021-02-22 19:41   ` [PATCH mvebu v3 02/10] cpufreq: armada-37xx: Fix setting TBG parent for load levels Pali Rohár
2021-03-29 14:45     ` Gregory CLEMENT
2021-02-22 19:41   ` [PATCH mvebu v3 03/10] clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock Pali Rohár
2021-03-29 14:46     ` Gregory CLEMENT
2021-02-22 19:41   ` [PATCH mvebu v3 04/10] cpufreq: armada-37xx: Fix the AVS value for load L1 Pali Rohár
2021-03-29 14:47     ` Gregory CLEMENT
2021-02-22 19:41   ` [PATCH mvebu v3 05/10] clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz Pali Rohár
2021-03-29 14:48     ` Gregory CLEMENT
2021-02-22 19:41   ` [PATCH mvebu v3 06/10] clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0 Pali Rohár
2021-03-29 14:49     ` Gregory CLEMENT
2021-02-22 19:41   ` [PATCH mvebu v3 07/10] cpufreq: armada-37xx: Fix driver cleanup when registration failed Pali Rohár
2021-03-29 14:58     ` Gregory CLEMENT
2021-02-22 19:41   ` [PATCH mvebu v3 08/10] cpufreq: armada-37xx: Fix determining base CPU frequency Pali Rohár
2021-03-29 14:59     ` Gregory CLEMENT
2021-02-22 19:41   ` [PATCH mvebu v3 09/10] cpufreq: armada-37xx: Remove cur_frequency variable Pali Rohár
2021-02-22 19:41   ` [PATCH mvebu v3 10/10] cpufreq: armada-37xx: Fix module unloading Pali Rohár
2021-03-01 19:20   ` [PATCH mvebu v3 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz Pali Rohár
2021-03-12  9:12     ` Gregory CLEMENT
2021-03-12  9:27       ` Marek Behún
2021-03-28 11:31       ` Pali Rohár
2021-04-08  0:38         ` Stephen Boyd
     [not found] <d59ba191-43db-4b7b-b201-62a60ca752c0@www.fastmail.com>
2021-02-09 21:33 ` [PATCH mvebu v2 " Pali Rohár
2021-02-09 21:45   ` nnet
2021-02-09 22:42     ` Pali Rohár
2021-02-09 22:52       ` nnet
2021-02-09 22:56         ` Pali Rohár
2021-02-09 23:16           ` nnet
2021-02-09 23:26             ` Marek Behún
2021-02-10  1:31               ` nnet
2021-02-10  1:51                 ` nnet
2021-02-10  2:07                   ` nnet
2021-02-10  9:23                     ` Pali Rohár
2021-02-10 17:34                       ` nnet
2021-02-10 18:03                         ` Pali Rohár
2021-02-10 19:08                           ` nnet
2021-02-10 19:18                             ` Marek Behún
2021-02-11 19:55                             ` Pali Rohár
2021-02-11 20:22                               ` nnet
2021-02-11 23:44                                 ` Pali Rohár
2021-02-12  0:41                                   ` nnet
2021-02-13 10:01                                     ` Pali Rohár
2021-02-13 18:30                                       ` nnet
2021-02-14 12:33                                         ` Pali Rohár
2021-02-16  5:48                                           ` nnet
2021-02-16 10:41                                             ` Pali Rohár
2021-02-16 16:27                                               ` nnet
2021-02-19 19:33                                                 ` Pali Rohár
2021-02-22  3:17                                                   ` nnet
2021-02-22  9:51                                                     ` Pali Rohár
2021-02-22 16:36                                                       ` nnet
2021-02-22 16:40                                                         ` Philip Soares
2021-02-10  2:12                   ` Marek Behún

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf766197-666f-3d7d-3b9e-ba512619004e@gmail.com \
    --to=anders.trier.olesen@gmail.com \
    --cc=a.heider@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=gerald@gk2.net \
    --cc=gregory.clement@bootlin.com \
    --cc=kabel@kernel.org \
    --cc=kostap@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luka.perkov@sartura.hr \
    --cc=miquel.raynal@bootlin.com \
    --cc=mturquette@baylibre.com \
    --cc=pali@kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=sboyd@kernel.org \
    --cc=tmn505@gmail.com \
    --cc=vladimir.vid@sartura.hr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).