]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sparc64, vdso: update the CLOCK_MONOTONIC_COARSE clock
authorNick Alcock <nick.alcock@oracle.com>
Mon, 2 Nov 2015 21:44:27 +0000 (21:44 +0000)
committerAllen Pais <allen.pais@oracle.com>
Wed, 4 Nov 2015 09:34:10 +0000 (15:04 +0530)
commitb3e0c78968c31b652d1c22680d4ffb039b139cdf
tree0dc1c8e755bd241ffbc5fbf5b7be0742ddd1a5c0
parent6037ec961e10e6e162c564d5306b2c2fddfb5b77
sparc64, vdso: update the CLOCK_MONOTONIC_COARSE clock

In the significant rewrite involved in porting the SPARC vDSO code to
v4.1, the CLOCK_MONOTONIC_COARSE clock moved from being computed from
the CLOCK_REALTIME variable in the vvar page to being tracked by its own
vvar (mirroring a similar change done for x86): this vvar is maintained
in the same way, but is derived only once per jiffy tick rather than
every time clock_gettime() is called, which is likely faster under
sufficiently insane clock_gettime() than the way we did it in v3.0.

Unfortunately, the code to maintain this variable in
arch/sparc/kernel/vsyscall_gtod.c was never implemented, so
clock_gettime(CLOCK_MONOTONIC_COARSE) always returns zero. This is a
little coarser than the user would probably like.

Easily fixed by updating the relevant vvar in the same way as is done on
x86.

Reported-by: Wim Coekaerts <wim.coekaerts@oracle.com>
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Orabug: 22137842
arch/sparc/kernel/vsyscall_gtod.c