public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
To: Joel Schopp <jschopp@austin.ibm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	Dipankar Sarma <dipankar@in.ibm.com>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Gautham R Shenoy <ego@in.ibm.com>,
	"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
	Arun Bharadwaj <arun@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/4]: ACPI/ARM: Register for cpuidle_pm_idle in drivers/acpi/processor_idle.c and arch/arm/mach-kirkwood/cpuidle.c
Date: Thu, 27 Aug 2009 17:25:36 +0530	[thread overview]
Message-ID: <20090827115536.GD24986@linux.vnet.ibm.com> (raw)
In-Reply-To: <20090827114908.GA24986@linux.vnet.ibm.com>

* Arun R Bharadwaj <arun@linux.vnet.ibm.com> [2009-08-27 17:19:08]:

Set the idle routine to cpuidle_pm_idle after registering cpuidle
devices. Earlier pm_idle was assumed as the defualt idle loop by
cpuidle infrastructure. This is changed to an architecture independent
cpuidle_pm_idle.

There are 2 instances which are using cpuidle infrastructure currently.
This patch makes the change in both the places.

Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
---
 arch/arm/mach-kirkwood/cpuidle.c |    6 ++++++
 drivers/acpi/processor_idle.c    |    5 +++++
 2 files changed, 11 insertions(+)

Index: linux.trees.git/arch/arm/mach-kirkwood/cpuidle.c
===================================================================
--- linux.trees.git.orig/arch/arm/mach-kirkwood/cpuidle.c
+++ linux.trees.git/arch/arm/mach-kirkwood/cpuidle.c
@@ -90,6 +90,12 @@ static int kirkwood_init_cpuidle(void)
 		printk(KERN_ERR "kirkwood_init_cpuidle: Failed registering\n");
 		return -EIO;
 	}
+
+	if (pm_idle != cpuidle_pm_idle) {
+		printk(KERN_INFO "using cpuidle idle loop\n");
+		pm_idle = cpuidle_pm_idle;
+	}
+
 	return 0;
 }
 
Index: linux.trees.git/drivers/acpi/processor_idle.c
===================================================================
--- linux.trees.git.orig/drivers/acpi/processor_idle.c
+++ linux.trees.git/drivers/acpi/processor_idle.c
@@ -1216,6 +1216,11 @@ int __cpuinit acpi_processor_power_init(
 				printk(" C%d[C%d]", i,
 				       pr->power.states[i].type);
 		printk(")\n");
+
+		if (pm_idle != cpuidle_pm_idle) {
+			printk(KERN_INFO "using cpuidle idle loop\n");
+			pm_idle = cpuidle_pm_idle;
+		}
 	}
 
 	/* 'power' [R] */

  parent reply	other threads:[~2009-08-27 11:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 11:49 [v3 PATCH 0/4]: CPUIDLE/POWER: Introducing cpuidle infrastructure to POWER Arun R Bharadwaj
2009-08-27 11:51 ` [PATCH 1/4]: CPUIDLE/POWER: Enable cpuidle for pSeries Arun R Bharadwaj
2009-08-27 11:53 ` [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c Arun R Bharadwaj
2009-08-27 12:53   ` Peter Zijlstra
2009-08-27 21:28     ` Benjamin Herrenschmidt
2009-08-28  4:49     ` Arun R Bharadwaj
2009-08-28  6:40       ` Peter Zijlstra
2009-08-28  6:14     ` Arun R Bharadwaj
2009-08-28  6:48       ` Peter Zijlstra
2009-08-28  6:59         ` Balbir Singh
2009-08-28  7:01         ` Peter Zijlstra
2009-08-28  8:19           ` Vaidyanathan Srinivasan
2009-08-28  6:43     ` Arun R Bharadwaj
2009-08-27 11:55 ` Arun R Bharadwaj [this message]
2009-08-27 11:57 ` [PATCH 4/4]: CPUIDLE/POWER: Implement Pseries Processor Idle module Arun R Bharadwaj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090827115536.GD24986@linux.vnet.ibm.com \
    --to=arun@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=dipankar@in.ibm.com \
    --cc=ego@in.ibm.com \
    --cc=jschopp@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox