linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Tatashin <pasha.tatashin@oracle.com>
To: x86@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com,
	peterz@infradead.org, tglx@linutronix.de, hpa@zytor.com
Subject: [v1 9/9] x86/tsc: use tsc early
Date: Wed, 22 Mar 2017 16:24:25 -0400	[thread overview]
Message-ID: <1490214265-899964-10-git-send-email-pasha.tatashin@oracle.com> (raw)
In-Reply-To: <1490214265-899964-1-git-send-email-pasha.tatashin@oracle.com>

Call tsc_early_init() to initialize early boot time stamps functionality on
the supported x86 platforms, and call tsc_early_fini() to finish this
feature after permanent tsc has been initialized.

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
---
 arch/x86/kernel/head64.c |    1 +
 arch/x86/kernel/time.c   |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index b5785c1..1068a56 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -157,6 +157,7 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
 	clear_bss();
 
 	clear_page(init_level4_pgt);
+	tsc_early_init();
 
 	kasan_early_init();
 
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
index d39c091..2d691eb 100644
--- a/arch/x86/kernel/time.c
+++ b/arch/x86/kernel/time.c
@@ -85,6 +85,7 @@ static __init void x86_late_time_init(void)
 {
 	x86_init.timers.timer_init();
 	tsc_init();
+	tsc_early_fini();
 }
 
 /*
-- 
1.7.1

  parent reply	other threads:[~2017-03-22 20:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 20:24 [v1 0/9] Early boot time stamps for x86 Pavel Tatashin
2017-03-22 20:24 ` [v1 1/9] sched/clock: broken stable to unstable transfer Pavel Tatashin
2017-03-27 10:27   ` [tip:sched/urgent] sched/clock: Fix " tip-bot for Pavel Tatashin
2017-03-22 20:24 ` [v1 2/9] sched/clock: interface to allow timestamps early in boot Pavel Tatashin
2017-03-22 20:24 ` [v1 3/9] x86/cpu: determining x86 vendor early Pavel Tatashin
2017-03-22 20:24 ` [v1 4/9] x86/tsc: early MSR-based CPU/TSC frequency discovery Pavel Tatashin
2017-03-22 20:24 ` [v1 5/9] x86/tsc: disable early messages from quick_pit_calibrate Pavel Tatashin
2017-03-22 20:24 ` [v1 6/9] x86/tsc: use cpuid to determine TSC frequency Pavel Tatashin
2017-03-22 20:24 ` [v1 7/9] x86/tsc: use cpuid to determine CPU frequency Pavel Tatashin
2017-03-22 20:24 ` [v1 8/9] x86/tsc: tsc early Pavel Tatashin
2017-03-24  5:38   ` kbuild test robot
2017-03-22 20:24 ` Pavel Tatashin [this message]
2017-03-22 20:27 ` [v1 0/9] Early boot time stamps for x86 Peter Zijlstra
2017-03-23  0:02   ` Pasha Tatashin
2017-03-22 20:28 ` Peter Zijlstra
2017-03-22 23:59   ` Pasha Tatashin
2017-03-23 10:56     ` Thomas Gleixner
2017-03-23 14:39       ` Pasha Tatashin
2017-03-23 18:40         ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490214265-899964-10-git-send-email-pasha.tatashin@oracle.com \
    --to=pasha.tatashin@oracle.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).