The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com,
	tglx@linutronix.de, kas@openvz.org
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/urgent] x86: tsc: Prevent delayed init if initial tsc calibration failed
Date: Tue, 11 Jan 2011 07:46:46 -0800	[thread overview]
Message-ID: <1294760806.2744.8.camel@work-vm> (raw)
In-Reply-To: <tip-29fe359ca20326e57b25e8545c49ed9ff5e830c7@git.kernel.org>

On Tue, 2011-01-11 at 10:51 +0000, tip-bot for Thomas Gleixner wrote:
> Commit-ID:  29fe359ca20326e57b25e8545c49ed9ff5e830c7
> Gitweb:     http://git.kernel.org/tip/29fe359ca20326e57b25e8545c49ed9ff5e830c7
> Author:     Thomas Gleixner <tglx@linutronix.de>
> AuthorDate: Tue, 11 Jan 2011 11:40:48 +0100
> Committer:  Thomas Gleixner <tglx@linutronix.de>
> CommitDate: Tue, 11 Jan 2011 11:48:39 +0100
> 
> x86: tsc: Prevent delayed init if initial tsc calibration failed
> 
> commit a8760ec (x86: Check tsc available/disabled in the delayed init
> function) missed to prevent the setup of the delayed init function in
> case the initial tsc calibration failed. This results in the same
> divide by zero bug as we have seen without the tsc disabled check.
> 
> Skip the delayed work setup when tsc_khz (the initial calibration
> value) is 0.
> 
> Bisected-and-tested-by: Kirill A. Shutemov <kas@openvz.org>
> Cc: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Krill: Thanks for reporting and testing!

Thomas: Thanks for the fix. I'll see if we can't condense the invalid
states a bit more. If tsc_khz=0, we probably should set tsc_disabled.

Acked-by: John Stultz <johnstul@us.ibm.com>

> ---
>  arch/x86/kernel/tsc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
> index 356a0d4..463901e 100644
> --- a/arch/x86/kernel/tsc.c
> +++ b/arch/x86/kernel/tsc.c
> @@ -965,7 +965,7 @@ out:
> 
>  static int __init init_tsc_clocksource(void)
>  {
> -	if (!cpu_has_tsc || tsc_disabled > 0)
> +	if (!cpu_has_tsc || tsc_disabled > 0 || !tsc_khz)
>  		return 0;
> 
>  	if (tsc_clocksource_reliable)



           reply	other threads:[~2011-01-11 15:47 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <tip-29fe359ca20326e57b25e8545c49ed9ff5e830c7@git.kernel.org>]

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=1294760806.2744.8.camel@work-vm \
    --to=john.stultz@linaro.org \
    --cc=hpa@zytor.com \
    --cc=kas@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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