From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] ARM64: arch_timer: Work around QorIQ Erratum A-008585
Date: Wed, 29 Jun 2016 09:19:17 +0100 [thread overview]
Message-ID: <57738485.4010602@arm.com> (raw)
In-Reply-To: <57737F24.5050906@huawei.com>
On 29/06/16 08:56, Hanjun Guo wrote:
> Hello Scott,
>
> On 2016/5/13 12:37, Scott Wood wrote:
> [...]
>>
>> +#ifdef CONFIG_ARM64
>> +static __always_inline void rewrite_tval(const int access,
>> + unsigned long evt, struct clock_event_device *clk)
>> +{
>> + u64 cval_old, cval_new;
>> + int timeout = 200;
>> +
>> + do {
>> + cval_old = __arch_counter_get_cntvct();
>> + arch_timer_reg_write(access, ARCH_TIMER_REG_TVAL, evt, clk);
>
> For not memory mapped timer, it will call arch_timer_reg_write_cp15() which has
> isb() at the end of arch_timer_reg_write_cp15()...
>
>> + cval_new = __arch_counter_get_cntvct();
>
> So there is isb() between counter retry read, I think it's likely cval_new will
> not be equal with cval_old when the cntvct is correct (time lapse is more than
> one arch timer cycle).
Are you saying that the isb will delay the execution of the read so much
that your timer will always change? Well, if your timer is in the GHz
range, maybe. But that also implies that it is out of spec (it should be
in the 1-50MHz range).
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2016-06-29 8:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 4:37 [PATCH v2 1/2] ARM64: arch_timer: Work around QorIQ Erratum A-008585 Scott Wood
2016-05-13 4:37 ` [PATCH v2 2/2] arm64: dts: Add timer erratum property for LS2080A and LS1043A Scott Wood
2016-05-13 10:24 ` [PATCH v2 1/2] ARM64: arch_timer: Work around QorIQ Erratum A-008585 Marc Zyngier
2016-06-22 1:45 ` Scott Wood
2016-06-25 7:16 ` Ding Tianhong
2016-06-27 13:13 ` Marc Zyngier
2016-06-29 2:05 ` Scott Wood
2016-07-01 6:51 ` Scott Wood
2016-06-29 8:11 ` Hanjun Guo
2016-06-29 8:24 ` Marc Zyngier
2016-06-29 9:19 ` Hanjun Guo
2016-05-16 16:14 ` Rob Herring
2016-06-29 7:56 ` Hanjun Guo
2016-06-29 8:19 ` Marc Zyngier [this message]
2016-06-29 8:31 ` Ding Tianhong
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=57738485.4010602@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).