public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com,
	tglx@linutronix.de
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/tsc] x86: Check tsc available/disabled in the delayed init function
Date: Mon, 13 Dec 2010 11:22:42 -0800	[thread overview]
Message-ID: <1292268162.2673.29.camel@work-vm> (raw)
In-Reply-To: <tip-a8760eca6cf60ed303ad494ef45901f63165d2c8@git.kernel.org>

On Mon, 2010-12-13 at 10:37 +0000, tip-bot for Thomas Gleixner wrote:
> Commit-ID:  a8760eca6cf60ed303ad494ef45901f63165d2c8
> Gitweb:     http://git.kernel.org/tip/a8760eca6cf60ed303ad494ef45901f63165d2c8
> Author:     Thomas Gleixner <tglx@linutronix.de>
> AuthorDate: Mon, 13 Dec 2010 11:28:02 +0100
> Committer:  Thomas Gleixner <tglx@linutronix.de>
> CommitDate: Mon, 13 Dec 2010 11:35:05 +0100
> 
> x86: Check tsc available/disabled in the delayed init function
> 
> The delayed TSC init function does not check whether the system has no
> TSC or TSC is disabled at the kernel command line, which results in a
> crash in the work queue based extended calibration due to division by
> zero because the basic calibration never happened.
> 
> Add the missing checks and do not touch TSC when not available or
> disabled.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: John Stultz <johnstul@us.ibm.com>

Thanks for catching this!

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


> ---
>  arch/x86/kernel/tsc.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
> index dc1393e..356a0d4 100644
> --- a/arch/x86/kernel/tsc.c
> +++ b/arch/x86/kernel/tsc.c
> @@ -965,6 +965,9 @@ out:
> 
>  static int __init init_tsc_clocksource(void)
>  {
> +	if (!cpu_has_tsc || tsc_disabled > 0)
> +		return 0;
> +
>  	if (tsc_clocksource_reliable)
>  		clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
>  	/* lower the rating if we already know its unstable: */



           reply	other threads:[~2010-12-13 19:22 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <tip-a8760eca6cf60ed303ad494ef45901f63165d2c8@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=1292268162.2673.29.camel@work-vm \
    --to=johnstul@us.ibm.com \
    --cc=hpa@zytor.com \
    --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