[PATCH v2 2/2] armv8: generic_timer: Use event stream for udelay
Tom Rini
trini at konsulko.com
Tue May 14 18:15:25 CEST 2024
On Wed, May 01, 2024 at 09:16:33AM +0100, Peter Hoyes wrote:
> From: Peter Hoyes <Peter.Hoyes at 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 at arm.com>
> Reviewed-by: Andre Przywara <andre.przywara at arm.com>
Applied to u-boot/next, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240514/ab181343/attachment.sig>
More information about the U-Boot
mailing list