Re: [PATCH] x86: don't compile vsmp_64 for 32bit

From: Ravikiran G Thirumalai
Date: Thu Mar 26 2009 - 14:18:36 EST


On Thu, Mar 26, 2009 at 10:11:53AM +0100, Ingo Molnar wrote:
>
>* Ravikiran G Thirumalai <kiran@xxxxxxxxxxxx> wrote:
>
>> > unsynchronized_tsc() just returns a guess anyway, and if you
>> > don't have X86_FEATURE_CONSTANT_TSC set, then it will return
>> > unstable for your hardware anyway, even without the
>> > is_vsmp_box() test.
>>
>> Unfortunately we use hardware which has X86_FEATURE_CONSTANT_TSC.
>>
>> >
>> > Failing that, you could add yourself to bad_tsc_dmi_table[] and
>> > have that mark the tsc as unstable (you have DMI, right?).
>> >
>>
>> Newer versions of the VMM does, but older ones don't :(, and
>> obviously we have older versions out in the field that still needs
>> to be supported.
>
>But those old versions wont have X86_FEATURE_CONSTANT_TSC set,
>right?

No, the old versions also do have X86_FEATURE_CONSTANT_TSC. The kernel
assumes that even netburst based cpus have synced tscs (of course this is
never mentioned in the intel documentation, but in the past we've
been told that that intel engineers say so -- that tscs are synced
and guaranteed to not drift between intel cpus)

Here's the code that sets X86_FEATURE_CONSTANT_TSC.

static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
{
if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
(c->x86 == 0x6 && c->x86_model >= 0x0e))
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);

...

Thanks,
Kiran
--
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/