From: Dou Liyang <douly.fnst@cn.fujitsu.com>
To: Pavel Tatashin <pasha.tatashin@oracle.com>,
<steven.sistare@oracle.com>, <daniel.m.jordan@oracle.com>,
<linux@armlinux.org.uk>, <schwidefsky@de.ibm.com>,
<heiko.carstens@de.ibm.com>, <john.stultz@linaro.org>,
<sboyd@codeaurora.org>, <x86@kernel.org>,
<linux-kernel@vger.kernel.org>, <mingo@redhat.com>,
<tglx@linutronix.de>, <hpa@zytor.com>
Subject: Re: [PATCH v7 6/6] x86/tsc: use tsc early
Date: Fri, 3 Nov 2017 10:54:26 +0800 [thread overview]
Message-ID: <c402aa6c-0c3e-bf0f-f20e-ae428780c4c6@cn.fujitsu.com> (raw)
In-Reply-To: <20171102172644.28555-7-pasha.tatashin@oracle.com>
Hi Pavel,
At 11/03/2017 01:26 AM, Pavel Tatashin wrote:
> tsc_early_init():
> Determines offset, shift and multiplier for the early clock based on the
> TSC frequency.
>
> tsc_early_fini()
> Implement the finish part of early tsc feature, prints message about the
> offset, which can be useful to find out how much time was spent in post and
> boot manager (if TSC starts from 0 during boot)
>
> sched_clock_early():
> TSC based implementation of early clock.
>
> 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 clock has been initialized.
>
> Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
> ---
> arch/x86/include/asm/tsc.h | 4 +++
> arch/x86/kernel/setup.c | 10 ++++--
> arch/x86/kernel/time.c | 1 +
> arch/x86/kernel/tsc.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 94 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h
> index f5e6f1c417df..6dc9618b24e3 100644
> --- a/arch/x86/include/asm/tsc.h
> +++ b/arch/x86/include/asm/tsc.h
> @@ -50,11 +50,15 @@ extern bool tsc_store_and_check_tsc_adjust(bool bootcpu);
> extern void tsc_verify_tsc_adjust(bool resume);
> extern void check_tsc_sync_source(int cpu);
> extern void check_tsc_sync_target(void);
> +void tsc_early_init(unsigned int khz);
> +void tsc_early_fini(void);
> #else
> static inline bool tsc_store_and_check_tsc_adjust(bool bootcpu) { return false; }
> static inline void tsc_verify_tsc_adjust(bool resume) { }
> static inline void check_tsc_sync_source(int cpu) { }
> static inline void check_tsc_sync_target(void) { }
> +static inline void tsc_early_init(unsigned int khz) { }
> +static inline void tsc_early_fini(void) { }
> #endif
>
> extern int notsc_setup(char *);
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 0957dd73d127..3df8be642b80 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -822,7 +822,11 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
> return 0;
> }
>
> -static void __init simple_udelay_calibration(void)
> +/*
> + * Initialize early tsc to show early boot timestamps, and also loops_per_jiffy
> + * for udelay
> + */
> +static void __init early_clock_calibration(void)
Commit:
eb496063c990 ("x86/timers: Move the simple udelay calibration to tsc.h")
moves this function to tsc.h and renames it in tip tree[1].
I guess using this commit, we can simplify this patch.
As this series, except the 2rd patch, is worked for x86, how about let
this series be based on tip.
BTW, I am testing your patches, will give you result later.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
Thanks,
dou
next prev parent reply other threads:[~2017-11-03 2:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 17:26 [PATCH v7 0/6] Early boot time stamps for x86 Pavel Tatashin
2017-11-02 17:26 ` [PATCH v7 1/6] x86/tsc: remove tsc_disabled flag Pavel Tatashin
2017-11-03 1:58 ` Dou Liyang
2017-11-03 14:23 ` Pavel Tatashin
2017-11-08 8:52 ` Dou Liyang
2017-11-08 17:23 ` Pavel Tatashin
2017-11-02 17:26 ` [PATCH v7 2/6] time: sync read_boot_clock64() with persistent clock Pavel Tatashin
2017-11-02 17:26 ` [PATCH v7 3/6] x86/time: read_boot_clock64() implementation Pavel Tatashin
2017-11-02 17:26 ` [PATCH v7 4/6] sched: early boot clock Pavel Tatashin
2017-11-02 17:26 ` [PATCH v7 5/6] x86/paravirt: add active_sched_clock to pv_time_ops Pavel Tatashin
2017-11-02 17:26 ` [PATCH v7 6/6] x86/tsc: use tsc early Pavel Tatashin
2017-11-03 2:54 ` Dou Liyang [this message]
2017-11-03 14:30 ` Pavel Tatashin
2017-11-08 9:17 ` Dou Liyang
2017-11-08 17:24 ` Pavel Tatashin
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=c402aa6c-0c3e-bf0f-f20e-ae428780c4c6@cn.fujitsu.com \
--to=douly.fnst@cn.fujitsu.com \
--cc=daniel.m.jordan@oracle.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mingo@redhat.com \
--cc=pasha.tatashin@oracle.com \
--cc=sboyd@codeaurora.org \
--cc=schwidefsky@de.ibm.com \
--cc=steven.sistare@oracle.com \
--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
all inboxes | Powered by JetHome®