Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1604661 > unrolled thread

Re: [PATCH 15/17] arm64: arch_timer: Workaround for Cortex-A73 erratum 858921

Started byMark Rutland <mark.rutland@arm.com>
First post2017-03-20 16:00 +0100
Last post2017-03-20 16:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 15/17] arm64: arch_timer: Workaround for Cortex-A73  erratum 858921 Mark Rutland <mark.rutland@arm.com> - 2017-03-20 16:00 +0100

#1604661 — Re: [PATCH 15/17] arm64: arch_timer: Workaround for Cortex-A73 erratum 858921

FromMark Rutland <mark.rutland@arm.com>
Date2017-03-20 16:00 +0100
SubjectRe: [PATCH 15/17] arm64: arch_timer: Workaround for Cortex-A73 erratum 858921
Message-ID<tn6WS-6aK-21@gated-at.bofh.it>
On Mon, Mar 06, 2017 at 11:26:20AM +0000, Marc Zyngier wrote:
> Cortex-A73 (all versions) counter read can return a wrong value
> when the counter crosses a 32bit boundary.
> 
> The workaround involves performing the read twice, and to return
> one or the other depending on whether a transition has taken place.
 
> +#ifdef CONFIG_ARM64_ERRATUM_858921
> +static u64 notrace arm64_858921_read_cntvct_el0(void)
> +{
> +	u64 _old, _new;
> +
> +	_old = read_sysreg(cntvct_el0);
> +	_new = read_sysreg(cntvct_el0);
> +	return (((_old ^ _new) >> 32) & 1) ? _old : _new;
> +}
> +#endif

Given this is a static inline, I think we can drop the underscores here.

Thanks,
Mark.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web