[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180712000419.5165-16-pasha.tatashin@oracle.com>
Date: Wed, 11 Jul 2018 20:04:16 -0400
From: Pavel Tatashin <pasha.tatashin@...cle.com>
To: steven.sistare@...cle.com, daniel.m.jordan@...cle.com,
linux@...linux.org.uk, schwidefsky@...ibm.com,
heiko.carstens@...ibm.com, john.stultz@...aro.org,
sboyd@...eaurora.org, x86@...nel.org, linux-kernel@...r.kernel.org,
mingo@...hat.com, tglx@...utronix.de, hpa@...or.com,
douly.fnst@...fujitsu.com, peterz@...radead.org, prarit@...hat.com,
feng.tang@...el.com, pmladek@...e.com, gnomes@...rguk.ukuu.org.uk,
linux-s390@...r.kernel.org, pasha.tatashin@...cle.com,
boris.ostrovsky@...cle.com, jgross@...e.com
Subject: [PATCH v13 15/18] x86/tsc: use tsc early
get timestamps and high resultion clock available to us as early as
possible.
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@...cle.com>
---
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
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -1408,6 +1408,7 @@ void __init tsc_early_init(void)
/* Sanitize TSC ADJUST before cyc2ns gets initialized */
tsc_store_and_check_tsc_adjust(true);
cyc2ns_init_boot_cpu();
+ static_branch_enable(&__use_tsc);
}
void __init tsc_init(void)
--
2.18.0
Powered by blists - more mailing lists