[PATCH v13 15/18] x86/tsc: use tsc early
- Date: Wed, 11 Jul 2018 20:04:16 -0400
- From: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
- Subject: [PATCH v13 15/18] x86/tsc: use tsc early
get timestamps and high resultion clock available to us as early as
native_sched_clock() outputs time based either on tsc after tsc_init() is
called later in boot, or using jiffies when clock interrupts are enabled,
which is also happens later in boot.
On the other hand, tsc frequency is known from as early as when
tsc_early_init() is called.
Use the early tsc calibration to output timestamps early.
Signed-off-by: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
arch/x86/kernel/tsc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 0b1abe7fdd8e..39ff2881f622 100644
@@ -1408,6 +1408,7 @@ void __init tsc_early_init(void)
/* Sanitize TSC ADJUST before cyc2ns gets initialized */
void __init tsc_init(void)