[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120816150939.GH7141@distanz.ch>
Date: Thu, 16 Aug 2012 17:09:39 +0200
From: Tobias Klauser <tklauser@...tanz.ch>
To: Catalin Marinas <catalin.marinas@....com>
Cc: linux-arch@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Will Deacon <will.deacon@....com>
Subject: Re: [PATCH v2 07/31] arm64: Process management
On 2012-08-14 at 19:52:08 +0200, Catalin Marinas <catalin.marinas@....com> wrote:
> +void cpu_idle(void)
> +{
> + local_fiq_enable();
> +
> + /* endless idle loop with no priority at all */
> + while (1) {
> + tick_nohz_idle_enter();
> + rcu_idle_enter();
> + while (!need_resched()) {
> + /*
> + * We need to disable interrupts here to ensure
> + * we don't miss a wakeup call.
> + */
> + local_irq_disable();
> + if (!need_resched()) {
> + stop_critical_timings();
> + pm_idle();
> + start_critical_timings();
> + /*
> + * pm_idle functions should always return
> + * with IRQs enabled.
> + */
> + WARN_ON(irqs_disabled());
> + } else {
> + local_irq_enable();
> + }
> + }
> + rcu_idle_exit();
> + tick_nohz_idle_exit();
> + preempt_enable_no_resched();
> + schedule();
> + preempt_disable();
You could use schedule_preempt_disabled() instead of the above 3 calls.
See http://lkml.kernel.org/n/tip-24swm5zut3h9c4a6s46x8rws@git.kernel.org
Cheers
Tobias
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists