lkml.org 
[lkml]   [2009]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[v4 PATCH 3/5]: pSeries: Incorporate registering of idle loop for pSeries.
* Arun R Bharadwaj <arun@linux.vnet.ibm.com> [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 <arun@linux.vnet.ibm.com>
---
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");

\
 
 \ /
  Last update: 2009-09-01 13:43    [W:0.095 / U:13.452 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site