Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754236AbZIALkl (ORCPT ); Tue, 1 Sep 2009 07:40:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754172AbZIALkl (ORCPT ); Tue, 1 Sep 2009 07:40:41 -0400 Received: from e28smtp01.in.ibm.com ([59.145.155.1]:44162 "EHLO e28smtp01.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754059AbZIALkk (ORCPT ); Tue, 1 Sep 2009 07:40:40 -0400 Date: Tue, 1 Sep 2009 17:10:36 +0530 From: Arun R Bharadwaj To: Joel Schopp , Benjamin Herrenschmidt , Paul Mackerras , Peter Zijlstra , Ingo Molnar , Vaidyanathan Srinivasan , Dipankar Sarma , Balbir Singh , Gautham R Shenoy , Arun Bharadwaj Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [v4 PATCH 3/5]: pSeries: Incorporate registering of idle loop for pSeries. Message-ID: <20090901114036.GJ7599@linux.vnet.ibm.com> Reply-To: arun@linux.vnet.ibm.com References: <20090901113704.GG7599@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20090901113704.GG7599@linux.vnet.ibm.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1988 Lines: 48 * Arun R Bharadwaj [2009-09-01 17:07:04]: Platform needs to register its idle function via register_idle_function() in order to provide a clean way of handling the ppc_md.power_save Signed-off-by: Arun R Bharadwaj --- arch/powerpc/platforms/pseries/setup.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) Index: linux.trees.git/arch/powerpc/platforms/pseries/setup.c =================================================================== --- linux.trees.git.orig/arch/powerpc/platforms/pseries/setup.c +++ linux.trees.git/arch/powerpc/platforms/pseries/setup.c @@ -280,6 +280,8 @@ static struct notifier_block pci_dn_reco static void __init pSeries_setup_arch(void) { + struct idle_function_desc pseries_idle_desc; + /* Discover PIC type and setup ppc_md accordingly */ pseries_discover_pic(); @@ -305,10 +307,17 @@ static void __init pSeries_setup_arch(vo vpa_init(boot_cpuid); if (get_lppaca()->shared_proc) { printk(KERN_DEBUG "Using shared processor idle loop\n"); - ppc_md.power_save = pseries_shared_idle_sleep; + //snprintf(pseries_idle_desc.name, 16, "shared_loop"); + pseries_idle_desc.name = "shared_loop"; + pseries_idle_desc.idle_func = pseries_shared_idle_sleep; + register_idle_function(&pseries_idle_desc); } else { printk(KERN_DEBUG "Using dedicated idle loop\n"); - ppc_md.power_save = pseries_dedicated_idle_sleep; + //snprintf(pseries_idle_desc.name, 16, "dedicated_loop"); + pseries_idle_desc.name = "dedicated_loop"; + pseries_idle_desc.idle_func = + pseries_dedicated_idle_sleep; + register_idle_function(&pseries_idle_desc); } } else { printk(KERN_DEBUG "Using default idle loop\n"); -- 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/