Re: [RFC PATCH] powerpc/32: Switch VDSO to C implementation.

Christophe Leroy
2019-12-20T18:24:26Z

Hi Thomas,

In do_hres(), I see:

cycles = __arch_get_hw_counter(vd->clock_mode);
ns = vdso_ts->nsec;
last = vd->cycle_last;
if (unlikely((s64)cycles < 0))
return -1;

__arch_get_hw_counter() returns a u64 values. On the PPC, this is read
from the timebase which is a 64 bits counter.

Why returning -1 if (s64)cycles < 0 ? Does it means we have to mask out
the most significant bit when reading the HW counter ?

Christophe