diff options
author | Andy Lutomirski <luto@kernel.org> | 2018-10-04 17:44:45 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-10-05 04:12:18 -0400 |
commit | bcc4a62a73cb65327d7268fbfa3a786d603f52dc (patch) | |
tree | c2e94ba24842651f81782fb22a51df0382d5e2b5 | |
parent | 89fe0a1f1c694a3b0b3cfa8c0952d603753f36df (diff) |
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>
-rw-r--r-- | arch/x86/include/asm/vgtod.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h index d17b092b9f1b..69d05c6d47f5 100644 --- a/arch/x86/include/asm/vgtod.h +++ b/arch/x86/include/asm/vgtod.h | |||
@@ -13,6 +13,15 @@ typedef u64 gtod_long_t; | |||
13 | typedef unsigned long gtod_long_t; | 13 | typedef unsigned long gtod_long_t; |
14 | #endif | 14 | #endif |
15 | 15 | ||
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 | */ | ||
16 | struct vgtod_ts { | 25 | struct vgtod_ts { |
17 | u64 sec; | 26 | u64 sec; |
18 | u64 nsec; | 27 | u64 nsec; |