mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Alok Kataria <akataria@vmware.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86, apic: Add apic calibration hook.
Date: Tue, 24 Aug 2010 15:37:10 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1008241532210.2768@localhost.localdomain> (raw)
In-Reply-To: <1282159660.15158.56.camel@ank32.eng.vmware.com>

On Wed, 18 Aug 2010, Alok Kataria wrote:
>  
> +static void __init initialize_lapic_clkevt(long delta)
> +{
> +	/* Calculate the scaled math multiplication factor */
> +	lapic_clockevent.mult = div_sc(delta, TICK_NSEC * LAPIC_CAL_LOOPS,
> +				       lapic_clockevent.shift);
> +	lapic_clockevent.max_delta_ns =
> +		clockevent_delta2ns(0x7FFFFF, &lapic_clockevent);
> +	lapic_clockevent.min_delta_ns =
> +		clockevent_delta2ns(0xF, &lapic_clockevent);
> +}
> +
>  static int __init calibrate_APIC_clock(void)
>  {
> +	apic_calibration_res = x86_init.timers.calibrate_apic();
> +	if (apic_calibration_res) {
> +		struct clock_event_device *levt = &__get_cpu_var(lapic_events);
> +		long delta;
> +
> +		if (lapic_clockevent.mult)
> +			return 0;

  Why is this necessary ? calibrate_APIC_clock() is only called once.

Thanks,

	tglx

  parent reply	other threads:[~2010-08-24 13:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 17:41 Alok Kataria
2010-08-18 17:53 ` Alok Kataria
2010-08-18 19:27 ` Alok Kataria
2010-08-24  0:12   ` Alok Kataria
2010-08-24 13:37   ` Thomas Gleixner [this message]
2010-08-24 17:06     ` Alok Kataria
2010-08-24 21:51       ` Thomas Gleixner
2010-08-24 21:58         ` Alok Kataria
2010-08-27 21:28           ` Alok Kataria
2010-09-01 19:30             ` Alok Kataria

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=alpine.LFD.2.00.1008241532210.2768@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=akataria@vmware.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --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®