[PATCH] powerpc/pseries: fix idle sleep early exit state

Paul Mackerras paulus at samba.org
Wed Dec 3 20:38:54 EST 2008


Sebastien Dugue writes:

>   In pseries_dedicated_idle_sleep(), if we need to exit idle during the
> snooze period (i.e. need_resched or cpu has been offlined), then we should
> re-disable the interrupts and clear TIF_POLLING_NRFLAG before leaving.

Are you doing this because of a bug you actually observed, or did you
just find this by inspection?  I don't believe it's necessary to do
these things (disabling interrupts, clearing TIF_POLLING_NRFLAG)
because the code that calls it immediately reenables interrupts and
sets TIF_POLLING_NRFLAG again.  From arch/powerpc/kernel/idle.c (line
73):

				if (!need_resched() && !cpu_should_die())
					ppc_md.power_save();

				local_irq_enable();
				set_thread_flag(TIF_POLLING_NRFLAG);

Paul.



More information about the Linuxppc-dev mailing list