Re: [PATCH] ACPI/CPUIDLE: prevent setting pm_idle to NULL

From: Andi Kleen
Date: Mon Jul 28 2008 - 13:47:07 EST


> + /*
> + * Fall back to the default idle loop, when pm_idle_save had
> + * been initialized.
> + */
> + if (pm_idle_save) {
> + pm_idle = pm_idle_save;
> + /* Relies on interrupts forcing exit from idle. */
> + synchronize_sched();
> + }

I think it would be better to fall back to default_idle (which
might need to be exported) when the old pointer is NULL. Now with your patch
the cpuidle idle code would run with inconsistent state for some time,
which is probably not good.

-Andi
--
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/