From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>,
Luc Michel <luc@lmichel.fr>, Huacai Chen <chenhuacai@kernel.org>,
Hao Wu <wuhaotsh@google.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [RFC PATCH-for-6.1 v2 2/6] target/mips/cpu: Update CP0 clock when CPU clock is propagated
Date: Fri, 9 Apr 2021 09:13:52 -0700 [thread overview]
Message-ID: <cb2bb6d8-c6ec-e0d0-d8fe-e28351015abb@linaro.org> (raw)
In-Reply-To: <20210409093623.2402750-3-f4bug@amsat.org>
On 4/9/21 2:36 AM, Philippe Mathieu-Daudé wrote:
> Setting the CP0 clock simply on CPU init is incorrect. First
> because the clock can not be yet propagated. Second because
> we aimed to support dynamic frequencies in commit a0713e85bfa,
> so the CPU frequency can be changed*after* init time.
>
> The correct way is to register a ClockCallback, which will
> update the CP0 period when the clock changes.
>
> Fixes: a0713e85bfa ("target/mips/cpu: Allow the CPU to use dynamic frequencies")
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
> target/mips/cpu.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2021-04-09 16:22 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 [this message]
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é
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=cb2bb6d8-c6ec-e0d0-d8fe-e28351015abb@linaro.org \
--to=richard.henderson@linaro.org \
--cc=aleksandar.rikalo@syrmia.com \
--cc=aurelien@aurel32.net \
--cc=chenhuacai@kernel.org \
--cc=f4bug@amsat.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 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).