Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe (take 2)

From: Cyrill Gorcunov
Date: Fri Jul 25 2008 - 09:48:45 EST


[Martin Wilck - Fri, Jul 25, 2008 at 03:38:47PM +0200]
> I wrote:
>
>> I have to say that my simplified patch failed to do the calibration
>> correctly on our test system (the original patch worked well). Please
>> stay tuned, we are investigating this currently.
>
> Please forget that. It was observed on an old "enterprise" kernel with
> which we are currently testing the backported patch with, and it was due
> to the fact that the initial counter value on that kernel was divided by
> APIC_DIVISOR (=16). The resulting initial counter value was too low in a
> "SMI flood" case, the counter could overlap. APIC_DIVISOR is no longer
> used in the current kernel.
>
> Martin
>
> --

Martin, if I understood you right - this means your patch is not
needed? Actually on 64bit mode APIC_DIVISOR is a bit hidden in
__setup_APIC_LVTT - you may see it as APIC_TDR_DIV_16 while setting
up divisor register. I was proposing patch for that but it leaded
to potetntial overflow (thanks Ingo for catching) so we leave it as
is. Maybe I miss something?

- Cyrill -
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/