Skip to contentSkip to conversation

idle patches for Linux 3.1

GIT PULL Len Brown 3 participants 7 messages Aug 3, 2011 – Aug 4, 2011

Subsystems (2)
lore
Share & tools
lore

Len Brown

author Tested-by Konrad Rzeszutek Wilk Acked-by Alan Cox
#0 lore raw

Hi Linus,

please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6.git idle-release

A new power management driver for Moorestown
(essentially a platform idle driver).

Plus some small cpuidle cleanups that were on the list in April.

The cpuidle patches set the stage for adding p-series support to cpuidle -- possibly by 3.2.

This will update the files shown below.

thanks!

Len Brown
Intel Open Source Technology Center

ps. individual patches are available on [email protected]

 Documentation/kernel-parameters.txt |    3 +
 MAINTAINERS                         |    6 +
 arch/arm/kernel/process.c           |    4 +-
 arch/sh/kernel/idle.c               |    6 +-
 arch/x86/include/asm/processor.h    |    2 -
 arch/x86/kernel/acpi/cstate.c       |   23 +
 arch/x86/kernel/process.c           |   23 -
 arch/x86/kernel/process_32.c        |    4 +-
 arch/x86/kernel/process_64.c        |    4 +-
 arch/x86/platform/mrst/Makefile     |    1 +
 arch/x86/platform/mrst/pmu.c        |  817 +++++++++++++++++++++++++++++++++++
 arch/x86/platform/mrst/pmu.h        |  234 ++++++++++
 arch/x86/xen/setup.c                |    3 +-
 drivers/cpuidle/cpuidle.c           |   50 ++-
 drivers/cpuidle/cpuidle.h           |    1 +
 drivers/cpuidle/driver.c            |    3 +
 drivers/cpuidle/governor.c          |    3 +
 include/linux/cpuidle.h             |    4 +
 18 files changed, 1141 insertions(+), 50 deletions(-)
 create mode 100644 arch/x86/platform/mrst/pmu.c
 create mode 100644 arch/x86/platform/mrst/pmu.h

through these commits:

Len Brown (5):
mrst_pmu: driver for Intel Moorestown Power Management Unit
cpuidle: create bootparam "cpuidle.off=1"
cpuidle: replace xen access to x86 pm_idle and default_idle x86 idle: move mwait_idle_with_hints() to where it is used
cpuidle: stop depending on pm_idle

with this log:

commit 619b3f9e65307529dd4bbc98efe9d2f3b632646c

Author: Len Brown <[email protected]>
Date:   Fri Apr 1 19:34:59 2011 -0400

cpuidle: stop depending on pm_idle

cpuidle users should call cpuidle_call_idle() directly rather than via (pm_idle)() function pointer.

Architecture may choose to continue using (pm_idle)(), but cpuidle need not depend on it:

my_arch_cpu_idle()
...
if(cpuidle_call_idle())
pm_idle();

commit 779d881fbcdf840e23a9bd3e237aebca4e0376e8

Author: Len Brown <[email protected]>
Date:   Wed Mar 30 23:52:29 2011 -0400

x86 idle: move mwait_idle_with_hints() to where it is used

...and make it static

no functional change

commit 0c70c6b12c37ececbfa9b7734495835514f273a4

Author: Len Brown <[email protected]>
Date:   Fri Apr 1 18:28:35 2011 -0400

cpuidle: replace xen access to x86 pm_idle and default_idle

When a Xen Dom0 kernel boots on a hypervisor, it gets access to the raw-hardware ACPI tables. While it parses the idle tables for the hypervisor's beneift, it uses HLT for its own idle.

Rather than have xen scribble on pm_idle and access default_idle, have it simply disable_cpuidle() so acpi_idle will not load and architecture default HLT will be used.

commit 3928f8d7ba2df07e391e390f9526c06774b84063

Author: Len Brown <[email protected]>
Date:   Fri Apr 1 18:13:10 2011 -0400

cpuidle: create bootparam "cpuidle.off=1"

useful for disabling cpuidle to fall back
to architecture-default idle loop

cpuidle drivers and governors will fail to register. on x86 they'll say so:

intel_idle: intel_idle yielding to (null)
ACPI: acpi_idle yielding to (null)

commit 8e24ed2af46a5d008d85bfeb128d25efc394a3fd

Author: Len Brown <[email protected]>
Date:   Tue Jul 12 22:29:32 2011 -0400

mrst_pmu: driver for Intel Moorestown Power Management Unit

The Moorestown (MRST) Power Management Unit (PMU) driver directs the SOC power states in the "Langwell" south complex (SCU).

It hooks pci_platform_pm_ops[] and thus observes all PCI ".set_state" requests. For devices in the SC, the pmu driver translates those PCI requests into the appropriate commands for the SCU.

The PMU driver helps implement S0i3, a deep system idle power idle state. Entry into S0i3 is via cpuidle, just like regular processor c-states. S0i3 depends on pre-conditions including uni-processor, graphics off, and certain IO devices in the SC must be off. If those pre-conditions are met, then the PMU allows cpuidle to enter S0i3, otherwise such requests are demoted, either to Atom C4 or Atom C6.

This driver is based on prototype work by Bruce Flemming, Illyas Mansoor, Rajeev D. Muralidhar, Vishwesh M. Rudramuni, Hari Seshadri and Sujith Thomas. The current driver also includes contributions from H. Peter Anvin, Arjan van de Ven, Kristen Accardi, and Yong Wang.

Thanks for additional review feedback from Alan Cox and Randy Dunlap.

#1 lore raw
Quoted 4 lines · Len Brown

please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6.git idle-release

As with the APEI tree, the commits are all recent and cannot have been in -next. It's the last day before the merge window closes, please tell me why I should take this in this cycle at all?

Linus

#2 lore raw
In reply to Len Brown
Quoted 4 lines · Len Brown

please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6.git idle-release

As with the APEI tree, the commits are all recent and cannot have been in -next. It's the last day before the merge window closes, please tell me why I should take this in this cycle at all?

Linus

author
#3 lore raw
Quoted 9 lines · Len Brown
Quoted 4 lines

please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6.git idle-release

As with the APEI tree, the commits are all recent and cannot have been in -next. It's the last day before the merge window closes, please tell me why I should take this in this cycle at all?

I re-based this branch immediately before pushing in order to add "Acked-by" annotations.

The cpuidle patches were in linux-next back in April. But they were on a branch with other patches that got deferred till 2012 b/c some folks were uneasy with me deleting so much code so suddenly. I cherry-picked some simple ones here b/c IBM asked me to in order to make their upcoming p-series cpuidle patches cleaner.

The mrst pmu.c driver is new. MRST doesn't work without it. Of course, if you don't have CONFIG_X86_MRST=y, you don't care.

Yes, this pull request is late, and if you skip it,
life will still go on. You'll simply see the same
patches wating for you in 10 weeks. On the other hand, some developers will have a happier summer if these get upstream now, and I'm here to support them if anything goes wrong.

thanks,
-Len

author
#4 lore raw
In reply to Linus Torvalds
Quoted 9 lines · Len Brown
Quoted 4 lines

please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6.git idle-release

As with the APEI tree, the commits are all recent and cannot have been in -next. It's the last day before the merge window closes, please tell me why I should take this in this cycle at all?

I re-based this branch immediately before pushing in order to add "Acked-by" annotations.

The cpuidle patches were in linux-next back in April. But they were on a branch with other patches that got deferred till 2012 b/c some folks were uneasy with me deleting so much code so suddenly. I cherry-picked some simple ones here b/c IBM asked me to in order to make their upcoming p-series cpuidle patches cleaner.

The mrst pmu.c driver is new. MRST doesn't work without it. Of course, if you don't have CONFIG_X86_MRST=y, you don't care.

Yes, this pull request is late, and if you skip it,
life will still go on. You'll simply see the same
patches wating for you in 10 weeks. On the other hand, some developers will have a happier summer if these get upstream now, and I'm here to support them if anything goes wrong.

thanks,
-Len

#5 lore raw
Quoted 1 line · Len Brown

and I'm here to support them if anything goes wrong.

Here's your first opportuntity for support. :)

I see Linus has already pulled this, but it doesn't compile on ARM or SH as I just found out, and Trinabh poined out in reply to patch 5/5.

Here's a fix.

Kevin

Quoted 1 line

From f8c825215f824b01a3f33416198def2fd685c7cf Mon Sep 17 00:00:00 2001

From: Kevin Hilman <[email protected]>
Date: Thu, 4 Aug 2011 15:49:51 -0700
Subject: [PATCH] cpuidle: ARM/SH: fix use of cpuidle_idle_call()

commit a0bfa1373859e9d11dc92561a8667588803e42d8 (cpuidle: stop depending on pm_idle) introduced a call to cpuidle_call_idle() in the ARM and SH idle paths, but this function doesn't exist. Use cpuidle_idle_call()

---
 arch/arm/kernel/process.c |    2 +-
 arch/sh/kernel/idle.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/kernel/process.c +1 -1
index d7ee0d4..1a347f4 100644
@@ -197,7 +197,7 @@ void cpu_idle(void)
 				cpu_relax();
 			} else {
 				stop_critical_timings();
-				if (cpuidle_call_idle())
+				if (cpuidle_idle_call())
 					pm_idle();
 				start_critical_timings();
 				/*
arch/sh/kernel/idle.c +1 -1
index 3c45de1..32114e0 100644
@@ -101,7 +101,7 @@ void cpu_idle(void)
 			local_irq_disable();
 			/* Don't trace irqs off for idle */
 			stop_critical_timings();
-			if (cpuidle_call_idle())
+			if (cpuidle_idle_call())
 				pm_idle();
 			/*
 			 * Sanity check to ensure that pm_idle() returns
Signature · 1 line
1.7.6
#6 lore raw
In reply to Len Brown
Quoted 1 line · Len Brown

and I'm here to support them if anything goes wrong.

Here's your first opportuntity for support. :)

I see Linus has already pulled this, but it doesn't compile on ARM or SH as I just found out, and Trinabh poined out in reply to patch 5/5.

Here's a fix.

Kevin

Quoted 1 line

From f8c825215f824b01a3f33416198def2fd685c7cf Mon Sep 17 00:00:00 2001

From: Kevin Hilman <[email protected]>
Date: Thu, 4 Aug 2011 15:49:51 -0700
Subject: [PATCH] cpuidle: ARM/SH: fix use of cpuidle_idle_call()

commit a0bfa1373859e9d11dc92561a8667588803e42d8 (cpuidle: stop depending on pm_idle) introduced a call to cpuidle_call_idle() in the ARM and SH idle paths, but this function doesn't exist. Use cpuidle_idle_call()

---
 arch/arm/kernel/process.c |    2 +-
 arch/sh/kernel/idle.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/kernel/process.c +1 -1
index d7ee0d4..1a347f4 100644
@@ -197,7 +197,7 @@ void cpu_idle(void)
 				cpu_relax();
 			} else {
 				stop_critical_timings();
-				if (cpuidle_call_idle())
+				if (cpuidle_idle_call())
 					pm_idle();
 				start_critical_timings();
 				/*
arch/sh/kernel/idle.c +1 -1
index 3c45de1..32114e0 100644
@@ -101,7 +101,7 @@ void cpu_idle(void)
 			local_irq_disable();
 			/* Don't trace irqs off for idle */
 			stop_critical_timings();
-			if (cpuidle_call_idle())
+			if (cpuidle_idle_call())
 				pm_idle();
 			/*
 			 * Sanity check to ensure that pm_idle() returns
Signature · 1 line
1.7.6