lkml.org 
[lkml]   [2010]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] x86, apic: Add apic calibration hook.
    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


    \
     
     \ /
      Last update: 2010-08-24 15:39    [W:4.046 / U:0.232 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site