public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Alok Kataria <akataria@vmware.com>
Cc: the arch/x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Zachary Amsden <zach@vmware.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: x86, vmi: TSC going backwards check in vmi clocksource
Date: Fri, 20 Feb 2009 18:58:41 +0100	[thread overview]
Message-ID: <20090220175841.GQ24538@elte.hu> (raw)
In-Reply-To: <1234989235.7991.2.camel@alok-dev1>


* Alok Kataria <akataria@vmware.com> wrote:

>  static cycle_t read_real_cycles(void)
>  {
> -	return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
> +	cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
> +	return ret >= clocksource_vmi.cycle_last ?
> +		ret : clocksource_vmi.cycle_last;

btw., could you please clean this up to use max()?

	Ingo

  parent reply	other threads:[~2009-02-20 17:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 20:33 x86, vmi: TSC going backwards check in vmi clocksource Alok Kataria
2009-02-19 11:18 ` Ingo Molnar
2009-02-19 18:03   ` Alok Kataria
2009-02-19 18:11     ` Ingo Molnar
2009-02-20 17:58 ` Ingo Molnar [this message]
2009-02-20 18:23   ` Alok Kataria
2009-02-20 18:31     ` Ingo Molnar

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=20090220175841.GQ24538@elte.hu \
    --to=mingo@elte.hu \
    --cc=akataria@vmware.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    --cc=zach@vmware.com \
    /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