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

Christophe Leroy christophe.leroy at c-s.fr
Sat Dec 21 05:24:22 AEDT 2019


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


More information about the Linuxppc-dev mailing list