* Andi Kleen <[EMAIL PROTECTED]> wrote:

> +static int mwait_usable(const struct cpuinfo_x86 *c)
> +{
> +     if (force_mwait)
> +             return 1;
> +     /* Any C1 states supported? */
> +     return c->cpuid_level >= 5 && ((cpuid_edx(5) >> 4) & 0xf) > 0;
> +}
> +
>  void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
>  {
> -     if (cpu_has(c, X86_FEATURE_MWAIT)) {
> +     if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) {
>               printk("monitor/mwait feature present.\n");

hm, why not clear FEATURE_MWAIT if it's "not usable"? That's the 
standard approach we do for CPU features that do not work.

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

Reply via email to