Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753704Ab3HVFbl (ORCPT ); Thu, 22 Aug 2013 01:31:41 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:39306 "EHLO e23smtp01.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753683Ab3HVFbi (ORCPT ); Thu, 22 Aug 2013 01:31:38 -0400 Subject: [PATCH V4 5/5] powernv/cpuidle: Enable idle powernv cpu to call into the cpuidle framework. To: linux-pm@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Deepthi Dharwar Cc: michael@ellerman.id.au, benh@kernel.crashing.org, daniel.lezcano@linaro.org, dongsheng.wang@freescale.com, rjw@sisk.pl, scottwood@freescale.com, srivatsa.bhat@linux.vnet.ibm.com, preeti@linux.vnet.ibm.com, svaidy@linux.vnet.ibm.com Date: Thu, 22 Aug 2013 11:00:56 +0530 Message-ID: <20130822053054.23277.72070.stgit@deepthi.in.ibm.com> In-Reply-To: <20130822052938.23277.67621.stgit@deepthi.in.ibm.com> References: <20130822052938.23277.67621.stgit@deepthi.in.ibm.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13082205-1618-0000-0000-0000047ECA56 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1691 Lines: 54 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 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index 84438af..fc62f21 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 @@ -175,6 +176,17 @@ 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()) { + HMT_low(); + HMT_very_low(); + } +} + static int __init pnv_probe(void) { unsigned long root = of_get_flat_dt_root(); @@ -205,7 +217,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, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/