From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e23smtp08.au.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A80D22C038C for ; Tue, 29 Oct 2013 22:02:27 +1100 (EST) Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Oct 2013 21:02:25 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id C57F42BB0044 for ; Tue, 29 Oct 2013 22:02:22 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9TAj2Ic1507640 for ; Tue, 29 Oct 2013 21:45:02 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9TB2L9I014371 for ; Tue, 29 Oct 2013 22:02:22 +1100 Subject: [PATCH V7 7/7] powernv/cpuidle: Enable idle powernv cpu to call into the cpuidle framework. To: benh@kernel.crashing.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Deepthi Dharwar Date: Tue, 29 Oct 2013 16:32:02 +0530 Message-ID: <20131029110201.31547.55088.stgit@deepthi.in.ibm.com> In-Reply-To: <20131029110052.31547.82682.stgit@deepthi.in.ibm.com> References: <20131029110052.31547.82682.stgit@deepthi.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cc: daniel.lezcano@linaro.org, preeti@linux.vnet.ibm.com, srivatsa.bhat@linux.vnet.ibm.com, scottwood@freescale.com, linux-pm@lists.linux-foundation.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This patch enables idle cpu on the powernv platform to hook on to the cpuidle framework, if available, else call on to default idle platform code. Signed-off-by: Deepthi Dharwar --- arch/powerpc/platforms/powernv/setup.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index e239dcf..42a6ba0 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -192,6 +193,16 @@ static void __init pnv_setup_machdep_rtas(void) } #endif /* CONFIG_PPC_POWERNV_RTAS */ +void powernv_idle(void) +{ + /* Hook to cpuidle framework if available, else + * call on default platform idle code + */ + if (cpuidle_idle_call()) { + power7_idle(); + } +} + static int __init pnv_probe(void) { unsigned long root = of_get_flat_dt_root(); @@ -222,7 +233,7 @@ define_machine(powernv) { .show_cpuinfo = pnv_show_cpuinfo, .progress = pnv_progress, .machine_shutdown = pnv_shutdown, - .power_save = power7_idle, + .power_save = powernv_idle, .calibrate_decr = generic_calibrate_decr, #ifdef CONFIG_KEXEC .kexec_cpu_down = pnv_kexec_cpu_down,