All of lore.kernel.org
 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 23:51:17 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1008242350430.2768@localhost.localdomain> (raw)
In-Reply-To: <1282669564.24498.2.camel@ank32.eng.vmware.com>

Alok,

On Tue, 24 Aug 2010, Alok Kataria wrote:

> Hi Thomas,
> 
> Thanks for taking a look.
> 
> On Tue, 2010-08-24 at 06:37 -0700, Thomas Gleixner wrote:
> > 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.
> > 
> 
> Yes, though timer.calibrate_apci() could behave differently on different
> platforms. For eg. the vmware_calibrate_apic doesn't initialize any of
> the lapic_clockevent state and we need this to set it up in that case.

Can we please make this consistent ?

Thanks,

	tglx

  reply	other threads:[~2010-08-24 21:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 17:41 [PATCH] x86, apic: Add apic calibration hook 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
2010-08-24 17:06     ` Alok Kataria
2010-08-24 21:51       ` Thomas Gleixner [this message]
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.1008242350430.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.