From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: Re: [PATCH v2 12/13] arm64: kernel: add CPU idle call Date: Thu, 17 Oct 2013 11:20:46 +0200 Message-ID: <525FABEE.9070100@linaro.org> References: <1381748590-14279-1-git-send-email-lorenzo.pieralisi@arm.com> <1381748590-14279-13-git-send-email-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-bk0-f47.google.com ([209.85.214.47]:48839 "EHLO mail-bk0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753118Ab3JQJUu (ORCPT ); Thu, 17 Oct 2013 05:20:50 -0400 Received: by mail-bk0-f47.google.com with SMTP id mx12so709323bkb.34 for ; Thu, 17 Oct 2013 02:20:49 -0700 (PDT) In-Reply-To: <1381748590-14279-13-git-send-email-lorenzo.pieralisi@arm.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Lorenzo Pieralisi , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: Dave Martin , Will Deacon , Catalin Marinas , Marc Zyngier , Mark Rutland , Sudeep KarkadaNagesha , Russell King , Colin Cross , Yu Tang , Zhou Zhu , Kumar Sankaran , Loc Ho , Feng Kan , Nicolas Pitre , Santosh Shilimkar , Stephen Boyd , Graeme Gregory , Hanjun Guo On 10/14/2013 01:03 PM, Lorenzo Pieralisi wrote: > When CPU idle is enabled, the architectural idle call should go throu= gh > the idle subsystem to allow CPUs to enter idle states defined > by the platform CPU idle back-end operations. > > This patch, mirroring other archs behaviour, adds the CPU idle call t= o the > architectural arch_cpu_idle implementation for arm64. > > Signed-off-by: Lorenzo Pieralisi Acked-by: Daniel Lezcano > --- > arch/arm64/kernel/process.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.= c > index de17c89..50491ec 100644 > --- a/arch/arm64/kernel/process.c > +++ b/arch/arm64/kernel/process.c > @@ -33,6 +33,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -98,8 +99,10 @@ void arch_cpu_idle(void) > * This should do all the clock switching and wait for interrupt > * tricks > */ > - cpu_do_idle(); > - local_irq_enable(); > + if (cpuidle_idle_call()) { > + cpu_do_idle(); > + local_irq_enable(); > + } > } > > #ifdef CONFIG_HOTPLUG_CPU > --=20 Linaro.org =E2=94=82 Open source software fo= r ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog