Will Deacon wrote:
{
- u32 vct_lo, vct_hi, tmp_hi;
- do {
vct_hi = readl_relaxed(arch_counter_base + CNTVCT_HI);
vct_lo = readl_relaxed(arch_counter_base + CNTVCT_LO);
tmp_hi = readl_relaxed(arch_counter_base + CNTVCT_HI);
- } while (vct_hi != tmp_hi);
- return ((u64) vct_hi << 32) | vct_lo;
- return readq(arch_counter_base + CNTVCT_LO);
Please drop this patch. It doesn't work.
On systems where readq() does work, wouldn't it be more optimal than the above while-loop?