From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/3] target/arm: Refactor default generic timer frequency handling
Date: Sat, 20 Apr 2024 09:58:14 -0700 [thread overview]
Message-ID: <ceff450b-834b-4bee-a655-79112ecb0e16@linaro.org> (raw)
In-Reply-To: <20240419184608.2675213-3-peter.maydell@linaro.org>
On 4/19/24 11:46, Peter Maydell wrote:
> The generic timer frequency is settable by board code via a QOM
> property "cntfrq", but otherwise defaults to 62.5MHz. The way this
> is done includes some complication resulting from how this was
> originally a fixed value with no QOM property. Clean it up:
>
> * always set cpu->gt_cntfrq_hz to some sensible value, whether
> the CPU has the generic timer or not, and whether it's system
> or user-only emulation
> * this means we can always use gt_cntfrq_hz, and never need
> the old GTIMER_SCALE define
> * set the default value in exactly one place, in the realize fn
>
> The aim here is to pave the way for handling the ARMv8.6 requirement
> that the generic timer frequency is always 1GHz. We're going to do
> that by having old CPU types keep their legacy-in-QEMU behaviour and
> having the default for any new CPU types be a 1GHz rather han 62.5MHz
> cntfrq, so we want the point where the default is decided to be in
> one place, and in code, not in a DEFINE_PROP_UINT64() initializer.
>
> This commit should have no behavioural changes.
>
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
> target/arm/internals.h | 7 ++++---
> target/arm/cpu.c | 31 +++++++++++++++++--------------
> target/arm/helper.c | 16 ++++++++--------
> 3 files changed, 29 insertions(+), 25 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2024-04-20 16:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 18:46 [PATCH 0/3] target/arm: Make the counter frequency default 1GHz for new CPUs, machines Peter Maydell
2024-04-19 18:46 ` [PATCH 1/3] hw: Add compat machines for 9.1 Peter Maydell
2024-04-19 18:46 ` [PATCH 2/3] target/arm: Refactor default generic timer frequency handling Peter Maydell
2024-04-20 16:58 ` Richard Henderson [this message]
2024-04-23 12:12 ` Philippe Mathieu-Daudé
2024-04-19 18:46 ` [PATCH 3/3] target/arm: Default to 1GHz cntfrq for 'max' and new CPUs Peter Maydell
2024-04-20 17:04 ` Richard Henderson
2024-04-23 20:47 ` Philippe Mathieu-Daudé
2024-04-22 12:56 ` [PATCH 0/3] target/arm: Make the counter frequency default 1GHz for new CPUs, machines Peter Maydell
2024-04-22 13:38 ` Marcin Juszkiewicz
2024-04-22 14:18 ` Peter Maydell
2024-04-22 15:37 ` Marcin Juszkiewicz
2024-04-23 7:26 ` Marcin Juszkiewicz
2024-04-22 15:57 ` Peter Maydell
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=ceff450b-834b-4bee-a655-79112ecb0e16@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).