From: Tom Rini <trini@konsulko.com>
To: Peter Hoyes <peter.hoyes@arm.com>
Cc: u-boot@lists.denx.de, andre.przywara@arm.com,
mk7.kang@samsung.com, ilias.apalodimas@linaro.org, wqu@suse.com,
neil.armstrong@linaro.org, sr@denx.de, michal.simek@amd.com,
patrick.delaunay@foss.st.com, sjg@chromium.org,
patrice.chotard@foss.st.com,
quentin.schulz@theobroma-systems.com
Subject: Re: [PATCH v2 2/2] armv8: generic_timer: Use event stream for udelay
Date: Tue, 14 May 2024 10:15:25 -0600 [thread overview]
Message-ID: <20240514161525.GO2568172@bill-the-cat> (raw)
In-Reply-To: <20240501081633.120913-3-peter.hoyes@arm.com>
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]
On Wed, May 01, 2024 at 09:16:33AM +0100, Peter Hoyes wrote:
> From: Peter Hoyes <Peter.Hoyes@arm.com>
>
> Polling cntpct_el0 in a tight loop for delays is inefficient.
> This is particularly apparent on Arm FVPs, which do not simulate
> real time, meaning that a 1s sleep can take a couple of orders
> of magnitude longer to execute in wall time.
>
> If running at EL2 or above (where CNTHCTL_EL2 is available), enable
> the cntpct_el0 event stream temporarily and use wfe to implement
> the delay more efficiently. The event period is chosen as a
> trade-off between efficiency and the fact that Arm FVPs do not
> typically simulate real time.
>
> This is only implemented for Armv8 boards, where an architectural
> timer exists, and only enabled by default for the ARCH_VEXPRESS64
> board family.
>
> Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2024-05-14 16:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 8:16 [PATCH v2 0/2] Optimize udelay for aarch64 boards Peter Hoyes
2024-05-01 8:16 ` [PATCH v2 1/2] arm: Move sev() and wfe() definitions to common Arm header file Peter Hoyes
2024-05-01 8:22 ` Peter Hoyes
2024-05-14 16:15 ` Tom Rini
2024-05-01 8:16 ` [PATCH v2 2/2] armv8: generic_timer: Use event stream for udelay Peter Hoyes
2024-05-07 10:26 ` Andre Przywara
2024-05-14 16:15 ` Tom Rini [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=20240514161525.GO2568172@bill-the-cat \
--to=trini@konsulko.com \
--cc=andre.przywara@arm.com \
--cc=ilias.apalodimas@linaro.org \
--cc=michal.simek@amd.com \
--cc=mk7.kang@samsung.com \
--cc=neil.armstrong@linaro.org \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=peter.hoyes@arm.com \
--cc=quentin.schulz@theobroma-systems.com \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
--cc=wqu@suse.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 read-only IMAP folder(s) and NNTP newsgroup(s).