From: Alok Kataria <akataria@vmware.com>
To: Thomas Gleixner <tglx@linutronix.de>
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 14:58:10 -0700 [thread overview]
Message-ID: <1282687090.24498.30.camel@ank32.eng.vmware.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1008242350430.2768@localhost.localdomain>
On Tue, 2010-08-24 at 14:51 -0700, Thomas Gleixner wrote:
> 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 ?
Let me rework this patch and get back in a day or two.
Thanks,
Alok
>
> Thanks,
>
> tglx
next prev parent reply other threads:[~2010-08-24 21:58 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
2010-08-24 17:06 ` Alok Kataria
2010-08-24 21:51 ` Thomas Gleixner
2010-08-24 21:58 ` Alok Kataria [this message]
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=1282687090.24498.30.camel@ank32.eng.vmware.com \
--to=akataria@vmware.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--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
Powered by JetHome