linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: schwab@suse.de
Cc: yash.shah@sifive.com, david.abdurachmanov@gmail.com,
	devicetree@vger.kernel.org, aou@eecs.berkeley.edu,
	Atish Patra <Atish.Patra@wdc.com>,
	anup@brainfault.org, lollivier@baylibre.com,
	linux-kernel@vger.kernel.org, green.wan@sifive.com,
	sachin.ghadi@sifive.com, robh+dt@kernel.org,
	deepa.kernel@gmail.com, Paul Walmsley <paul.walmsley@sifive.com>,
	Alistair Francis <Alistair.Francis@wdc.com>,
	linux-riscv@lists.infradead.org, bmeng.cn@gmail.com
Subject: Re: [PATCH 0/3] Dynamic CPU frequency switching for the HiFive
Date: Thu, 09 Jul 2020 13:48:05 -0700 (PDT)	[thread overview]
Message-ID: <mhng-da95d8d4-c593-4c23-a543-bfe9d8c8e40b@palmerdabbelt-glaptop1> (raw)
In-Reply-To: <mvmtuylcb4h.fsf@suse.de>

On Mon, 06 Jul 2020 01:15:42 PDT (-0700), schwab@suse.de wrote:
> On Jul 03 2020, Yash Shah wrote:
>
>> Yes, you are right. The userspace governor is the only one supported.
>
> That doesn't make sense to me.  How is the userspace governor different
> from any other governor?

It's not.

The issue here is that pretty much everything is on one clock, including all
the cores and the simple IO devices.  These IO devices have programmable clock
dividers that need to mesh up with the input clock rate in order to operate
correctly.  There's no way to do that atomicly WRT the device's clock, so we
have to pause device IO while messing with the clocks.

I bet there's some issue with 4cbd7814bbd5 ("tty: sifive: Finish transmission
before changing the clock") that's causing the serial to get corrupted, and I
guess I'd start with all the issues I pointed out in the patch text :).
Presumably we need to fix the SPI driver as well, in much the same fashion
(though hopefully with fewer hardware surprises to work around).  I'd be way
more worried about ChipLink, as I don't know how that's clocked.  IIRC Ethernet
has its own clock so it should be safe.

I'd be very skeptical about turning on dynamic frequency scaling for the HiFive
Unleashed, as it's probably just not worth chasing the long tail of bugs.  Even
allowing the userspace governor is a bit sketchy, but given that it's a very
early dev board I assume these sorts of problems are expected.

If we do ever turn dynamic frequency scaling on it's not going to default to
allowing 1.4GHz, from what I saw speeds much over 1GHz don't work for most
people.

  reply	other threads:[~2020-07-09 20:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 12:01 [PATCH 0/3] Dynamic CPU frequency switching for the HiFive Yash Shah
2020-06-16 12:01 ` [PATCH 1/3] riscv: defconfig, Kconfig: enable CPU power management Yash Shah
2020-06-16 12:01 ` [PATCH 2/3] riscv: dts: fu540-c000: define hart clocks Yash Shah
2021-06-16  3:16   ` Bin Meng
2021-06-16 15:13     ` David Abdurachmanov
2021-06-16 22:56       ` Bin Meng
2020-06-16 12:01 ` [PATCH 3/3] riscv: dts: HiFive Unleashed: define a default set of CPU OPPs Yash Shah
2020-06-29  9:30 ` [PATCH 0/3] Dynamic CPU frequency switching for the HiFive Greentime Hu
2020-07-01 10:40 ` Andreas Schwab
2020-07-01 12:04   ` David Abdurachmanov
2020-07-03  5:53     ` Yash Shah
2020-07-06  8:15       ` Andreas Schwab
2020-07-09 20:48         ` Palmer Dabbelt [this message]
2020-07-08 12:06   ` Yash Shah

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=mhng-da95d8d4-c593-4c23-a543-bfe9d8c8e40b@palmerdabbelt-glaptop1 \
    --to=palmer@dabbelt.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=Atish.Patra@wdc.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=bmeng.cn@gmail.com \
    --cc=david.abdurachmanov@gmail.com \
    --cc=deepa.kernel@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=green.wan@sifive.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lollivier@baylibre.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=sachin.ghadi@sifive.com \
    --cc=schwab@suse.de \
    --cc=yash.shah@sifive.com \
    /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).