]> git.baikalelectronics.ru Git - kernel.git/commit
ia64: Update fsyscall gettime to use modern vsyscall_update
authorTony Luck <tony.luck@intel.com>
Tue, 31 Oct 2017 17:43:39 +0000 (10:43 -0700)
committerTony Luck <tony.luck@intel.com>
Tue, 31 Oct 2017 17:58:36 +0000 (10:58 -0700)
commit005d925c021b9ccb94417597405591768c83c16c
tree7ea81dfb26bb9efa59638d7985b8cb49efd6d8bd
parent22f59aa048992942f3ea633fd1c02b9731a4dcc1
ia64: Update fsyscall gettime to use modern vsyscall_update

John Stultz provided the outline for this patch back in May 2014 here:

http://patches.linaro.org/patch/30501/

but I let this sit on the shelf for too long and in the intervening
years almost every field in "struct timekeeper" was changed. So this
is almost completely different from his original. Though the key change
in arch/ia64/kernel/fsys.S remains the same.

The core logic change with the updated vsyscall method is that we
preserve the base nanosecond value in shifted nanoseconds, which
allows us to avoid truncating and rounding up to the next nanosecond
every tick to avoid inconsistencies.

Thus the logic moved from
nsec = ((cycle_delta * mult)>>shift) + base_nsec;
to
nsec = ((cycle_delta * mult) + base_snsec) >> shift;

Cc: John Stultz <john.stultz@linaro.org>
Cc: linux-ia64@vger.kernel.org
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/Kconfig
arch/ia64/kernel/asm-offsets.c
arch/ia64/kernel/fsys.S
arch/ia64/kernel/fsyscall_gtod_data.h
arch/ia64/kernel/time.c