Re: [PATCH 1/2] powerpc: Rework VDSO gettimeofday to prevent time going backwards

2010-06-20 Thread Paul Mackerras
Here's the test program I used to verify that the VDSO gettimeofday and clock_gettime are giving correct results. Paul. /* * Copyright 2010 Paul Mackerras , IBM. * * This program is free software; it may be used and redistributed * under the terms of the GNU Public Licence, either version 2,

[PATCH 1/2] powerpc: Rework VDSO gettimeofday to prevent time going backwards

2010-06-20 Thread Paul Mackerras
Currently it is possible for userspace to see the result of gettimeofday() going backwards by 1 microsecond, assuming that userspace is using the gettimeofday() in the VDSO. The VDSO gettimeofday() algorithm computes the time in "xsecs", which are units of 2^-20 seconds, or approximately 0.954 mic