All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>,
	Luc Michel <luc@lmichel.fr>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Hao Wu <wuhaotsh@google.com>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [RFC PATCH-for-6.1 v2 6/6] hw/mips/loongson3_virt: Raise CPU clock to 2 GHz
Date: Sat, 10 Apr 2021 16:05:51 +0200	[thread overview]
Message-ID: <9f07acda-8949-de4e-a00a-192a4b3c6179@amsat.org> (raw)
In-Reply-To: <CAAhV-H76XQZxvp9b2fE-R-Eq26GViaPR-iC2tG6PYhWtxNasxA@mail.gmail.com>

Hi Huacai,

On 4/10/21 4:43 AM, Huacai Chen wrote:
> Hi, Philippe,
> 
> On Fri, Apr 9, 2021 at 5:36 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> Commit cd3a53b727d ("clock: Add clock_ns_to_ticks() function")
>> removed the limitation of using clock with a frequency of 1 GHz
>> or more.
>>
>> The previous commit converted the MIPS CP0 timer to use this
>> new clock_ns_to_ticks() function. We can now use a clock of
>> 2 GHz with the Loongson3 virt board.
> Yes, we can do this, but why should we do this? I don't think this can
> bring any advantages.

IIRC this was how you sent the earlier series, then we had to reduce
the frequency to <1GHz due to the DIV#0 bug. Now it is fixed I thought
you'd get this back.

I spent time with the R4K timer because it is often used by embedded
firmwares, and a mismatch with the CPU clock makes firmware not work
well. I suppose when using Linux guests it is not a real issue, because
1/ if there is another timer (different peripheral on a system-on-soc)
Linux will use it first, 2/ Linux does some early check to adapt with
the tick rate IIRC (it doesn't assume a precise rate).

I'm fine with the current Loongson3 virt board behavior with TCG,
so let's disregard this patch.

Thanks,

Phil.


      reply	other threads:[~2021-04-10 14:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  9:36 [RFC PATCH-for-6.1 v2 0/6] target/mips/cp0_timer: Use new clock_ns_to_ticks() Philippe Mathieu-Daudé
2021-04-09  9:36 ` [RFC PATCH-for-6.1 v2 1/6] target/mips/cpu: Use clock_has_source() instead of clock_get() Philippe Mathieu-Daudé
2021-04-09 16:13   ` Richard Henderson
2021-04-09  9:36 ` [RFC PATCH-for-6.1 v2 2/6] target/mips/cpu: Update CP0 clock when CPU clock is propagated Philippe Mathieu-Daudé
2021-04-09 16:13   ` Richard Henderson
2021-04-09  9:36 ` [RFC PATCH-for-6.1 v2 3/6] target/mips/cp0_timer: Add ns_to_count() helper Philippe Mathieu-Daudé
2021-04-09 16:15   ` Richard Henderson
2021-04-09  9:36 ` [RFC PATCH-for-6.1 v2 4/6] target/mips/cp0_timer: Add ns_substract_to_count() helper Philippe Mathieu-Daudé
2021-04-09 16:27   ` Richard Henderson
2021-04-09  9:36 ` [RFC PATCH-for-6.1 v2 5/6] target/mips/cp0_timer: Use new clock_ns_to_ticks() Philippe Mathieu-Daudé
2021-04-09 16:42   ` Richard Henderson
2021-04-09  9:36 ` [RFC PATCH-for-6.1 v2 6/6] hw/mips/loongson3_virt: Raise CPU clock to 2 GHz Philippe Mathieu-Daudé
2021-04-10  2:43   ` Huacai Chen
2021-04-10 14:05     ` Philippe Mathieu-Daudé [this message]

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=9f07acda-8949-de4e-a00a-192a4b3c6179@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=chenhuacai@kernel.org \
    --cc=luc@lmichel.fr \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wuhaotsh@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.