projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89fe0a1
)
x86/vdso: Document vgtod_ts better
author
Andy Lutomirski
<luto@kernel.org>
Thu, 4 Oct 2018 21:44:45 +0000
(14:44 -0700)
committer
Ingo Molnar
<mingo@kernel.org>
Fri, 5 Oct 2018 08:12:18 +0000
(10:12 +0200)
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>
arch/x86/include/asm/vgtod.h
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/include/asm/vgtod.h
b/arch/x86/include/asm/vgtod.h
index d17b092b9f1bc7be42af1fc3d40d9c47152c306a..69d05c6d47f58525a30454687ebb56c20886c96b 100644
(file)
--- a/
arch/x86/include/asm/vgtod.h
+++ b/
arch/x86/include/asm/vgtod.h
@@
-13,6
+13,15
@@
typedef u64 gtod_long_t;
typedef unsigned long gtod_long_t;
#endif
+/*
+ * There is one of these objects in the vvar page for each
+ * vDSO-accelerated clockid. For high-resolution clocks, this encodes
+ * the time corresponding to vsyscall_gtod_data.cycle_last. For coarse
+ * clocks, this encodes the actual time.
+ *
+ * To confuse the reader, for high-resolution clocks, nsec is left-shifted
+ * by vsyscall_gtod_data.shift.
+ */
struct vgtod_ts {
u64 sec;
u64 nsec;