/* The idle thread. There's no useful work to be done, so just try to conserve power and have a low exit latency (ie sit in a loop waiting for somebody to say that they'd like to reschedule)  */
void cpu_idle(void)
/* The idle thread. There's no useful work to be done, so just try to conserve power and have a low exit latency (ie sit in a loop waiting for somebody to say that they'd like to reschedule)  */
void cpu_idle(void)
{
	unsigned int cpu = smp_processor_id();
	set_thread_flag(TIF_POLLING_NRFLAG);
	while (1) {
		tick_nohz_stop_sched_tick(1);
		while (!need_resched() && cpu_online(cpu)) {
			check_pgt_cache();
			rmb();
			local_irq_disable();
			stop_critical_timings();
			pm_idle();
			WARN_ON(irqs_disabled());
			start_critical_timings();
		}
		tick_nohz_restart_sched_tick();
		preempt_enable_no_resched();
		schedule();
		preempt_disable();
	}
}