Skip to content

Commit bcc4a62

Browse files
amlutoIngo Molnar
authored andcommitted
x86/vdso: Document vgtod_ts better
After reading do_hres() and do_course() and scratching my head a bit, I figured out why the arithmetic is strange. Document it. Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/f66f53d81150bbad47d7b282c9207a71a3ce1c16.1538689401.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 89fe0a1 commit bcc4a62

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arch/x86/include/asm/vgtod.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ typedef u64 gtod_long_t;
1313
typedef unsigned long gtod_long_t;
1414
#endif
1515

16+
/*
17+
* There is one of these objects in the vvar page for each
18+
* vDSO-accelerated clockid. For high-resolution clocks, this encodes
19+
* the time corresponding to vsyscall_gtod_data.cycle_last. For coarse
20+
* clocks, this encodes the actual time.
21+
*
22+
* To confuse the reader, for high-resolution clocks, nsec is left-shifted
23+
* by vsyscall_gtod_data.shift.
24+
*/
1625
struct vgtod_ts {
1726
u64 sec;
1827
u64 nsec;

0 commit comments

Comments
 (0)