From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) (using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3r8l7k06HhzDqCJ for ; Wed, 18 May 2016 16:45:21 +1000 (AEST) Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 May 2016 00:45:19 -0600 Date: Wed, 18 May 2016 12:15:11 +0530 From: Gautham R Shenoy To: "Shreyas B. Prabhu" Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, paulus@ozlabs.org, linux-kernel@vger.kernel.org, mikey@neuling.org Subject: Re: [PATCH v2 6/9] powerpc/powernv: set power_save func after the idle states are initialized Message-ID: <20160518064511.GA11935@in.ibm.com> Reply-To: ego@linux.vnet.ibm.com References: <1462263878-25237-1-git-send-email-shreyas@linux.vnet.ibm.com> <1462263878-25237-7-git-send-email-shreyas@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1462263878-25237-7-git-send-email-shreyas@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, May 03, 2016 at 01:54:35PM +0530, Shreyas B. Prabhu wrote: > pnv_init_idle_states discovers supported idle states from the > device tree and does the required initialization. Set power_save > function pointer only after this initialization is done > > Signed-off-by: Shreyas B. Prabhy Reviewed-by: Gautham R. Shenoy > --- > arch/powerpc/platforms/powernv/idle.c | 3 +++ > arch/powerpc/platforms/powernv/setup.c | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c > index fcc8b68..fbb09fb 100644 > --- a/arch/powerpc/platforms/powernv/idle.c > +++ b/arch/powerpc/platforms/powernv/idle.c > @@ -285,6 +285,9 @@ static int __init pnv_init_idle_states(void) > } > > pnv_alloc_idle_core_states(); > + > + if (supported_cpuidle_states & OPAL_PM_NAP_ENABLED) > + ppc_md.power_save = power7_idle; > out_free: > kfree(flags); > out: > diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c > index 1acb0c7..c9685b6 100644 > --- a/arch/powerpc/platforms/powernv/setup.c > +++ b/arch/powerpc/platforms/powernv/setup.c > @@ -312,7 +312,7 @@ define_machine(powernv) { > .get_proc_freq = pnv_get_proc_freq, > .progress = pnv_progress, > .machine_shutdown = pnv_shutdown, > - .power_save = power7_idle, > + .power_save = NULL, > .calibrate_decr = generic_calibrate_decr, > #ifdef CONFIG_KEXEC > .kexec_cpu_down = pnv_kexec_cpu_down, > -- > 2.4.11 >