<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/cpuidle, branch v3.6</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/cpuidle?h=v3.6</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/cpuidle?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-08-17T17:37:08Z</updated>
<entry>
<title>cpuidle: Prevent null pointer dereference in cpuidle_coupled_cpu_notify</title>
<updated>2012-08-17T17:37:08Z</updated>
<author>
<name>Jon Medhurst (Tixy)</name>
<email>tixy@linaro.org</email>
</author>
<published>2012-08-15T20:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5fbbb90dfdedb9a258550e4e5debd3013266372e'/>
<id>urn:sha1:5fbbb90dfdedb9a258550e4e5debd3013266372e</id>
<content type='text'>
When a kernel is built to support multiple hardware types it's possible
that CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is set but the hardware the
kernel is run on doesn't support cpuidle and therefore doesn't load a
driver for it. In this case, when the system is shut down,
cpuidle_coupled_cpu_notify() gets called with cpuidle_devices set to
NULL. There are quite possibly other circumstances where this
situation can also occur and we should check for it.

Signed-off-by: Jon Medhurst &lt;tixy@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>cpuidle: coupled: fix sleeping while atomic in cpu notifier</title>
<updated>2012-08-17T17:37:01Z</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2012-08-15T20:10:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=63c6ba4352009a5f85b32307c001abeb5baebd28'/>
<id>urn:sha1:63c6ba4352009a5f85b32307c001abeb5baebd28</id>
<content type='text'>
The cpu hotplug notifier gets called in both atomic and non-atomic
contexts, it is not always safe to lock a mutex.  Filter out all events
except the six necessary ones, which are all sleepable, before taking
the mutex.

Signed-off-by: Colin Cross &lt;ccross@android.com&gt;
Reviewed-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux</title>
<updated>2012-07-26T21:28:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-07-26T21:28:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=476525004ac7e2f990b6956efcd44d0780c2ab4c'/>
<id>urn:sha1:476525004ac7e2f990b6956efcd44d0780c2ab4c</id>
<content type='text'>
Pull ACPI &amp; power management update from Len Brown:
 "Re-write of the turbostat tool.
     lower overhead was necessary for measuring very large system when
     they are very idle.

  IVB support in intel_idle
     It's what I run on my IVB, others should be able to also:-)

  ACPICA core update
     We have found some bugs due to divergence between Linux and the
     upstream ACPICA base.  Most of these patches are to reduce that
     divergence to reduce the risk of future bugs.

  Some cpuidle updates, mostly for non-Intel
     More will be coming, as they depend on this part.

  Some thermal management changes needed by non-ACPI systems.

  Some _OST (OS Status Indication) updates for hot ACPI hot-plug."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (51 commits)
  Thermal: Documentation update
  Thermal: Add Hysteresis attributes
  Thermal: Make Thermal trip points writeable
  ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check
  tools/power: turbostat: fix large c1% issue
  tools/power: turbostat v2 - re-write for efficiency
  ACPICA: Update to version 20120711
  ACPICA: AcpiSrc: Fix some translation issues for Linux conversion
  ACPICA: Update header files copyrights to 2012
  ACPICA: Add new ACPI table load/unload external interfaces
  ACPICA: Split file: tbxface.c -&gt; tbxfload.c
  ACPICA: Add PCC address space to space ID decode function
  ACPICA: Fix some comment fields
  ACPICA: Table manager: deploy new firmware error/warning interfaces
  ACPICA: Add new interfaces for BIOS(firmware) errors and warnings
  ACPICA: Split exception code utilities to a new file, utexcep.c
  ACPI: acpi_pad: tune round_robin_time
  ACPICA: Update to version 20120620
  ACPICA: Add support for implicit notify on multiple devices
  ACPICA: Update comments; no functional change
  ...
</content>
</entry>
<entry>
<title>Merge branches 'acpi_pad', 'acpica', 'apei-bugzilla-43282', 'battery', 'cpuidle-coupled', 'cpuidle-tweaks', 'intel_idle-ivb', 'ost', 'red-hat-bz-772730', 'thermal', 'thermal-spear' and 'turbostat-v2' into release</title>
<updated>2012-07-26T04:03:58Z</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2012-07-26T04:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ec033d0a02901551346b9f43f8ff9bad51378891'/>
<id>urn:sha1:ec033d0a02901551346b9f43f8ff9bad51378891</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'pm-domains'</title>
<updated>2012-07-18T22:03:17Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-07-18T22:03:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7791bd230c6fe65348456564743f99fa066f00e7'/>
<id>urn:sha1:7791bd230c6fe65348456564743f99fa066f00e7</id>
<content type='text'>
* pm-domains:
  PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset
  PM / Domains: Replace plain integer with NULL pointer in domain.c file
  PM / Domains: Add missing static storage class specifier in domain.c file
  PM / Domains: Allow device callbacks to be added at any time
  PM / Domains: Add device domain data reference counter
  PM / Domains: Add preliminary support for cpuidle, v2
  PM / Domains: Do not stop devices after restoring their states
  PM / Domains: Use subsystem runtime suspend/resume callbacks by default
</content>
</entry>
<entry>
<title>PM / cpuidle: System resume hang fix with cpuidle</title>
<updated>2012-07-10T19:34:49Z</updated>
<author>
<name>Preeti U Murthy</name>
<email>preeti@linux.vnet.ibm.com</email>
</author>
<published>2012-07-09T08:12:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8651f97bd951d0bb1c10fa24e3fa3455193f3548'/>
<id>urn:sha1:8651f97bd951d0bb1c10fa24e3fa3455193f3548</id>
<content type='text'>
On certain bios, resume hangs if cpus are allowed to enter idle states
during suspend [1].

This was fixed in apci idle driver [2].But intel_idle driver does not
have this fix. Thus instead of replicating the fix in both the idle
drivers, or in more platform specific idle drivers if needed, the
more general cpuidle infrastructure could handle this.

A suspend callback in cpuidle_driver could handle this fix. But
a cpuidle_driver provides only basic functionalities like platform idle
state detection capability and mechanisms to support entry and exit
into CPU idle states. All other cpuidle functions are found in the
cpuidle generic infrastructure for good reason that all cpuidle
drivers, irrepective of their platforms will support these functions.

One option therefore would be to register a suspend callback in cpuidle
which handles this fix. This could be called through a PM_SUSPEND_PREPARE
notifier. But this is too generic a notfier for a driver to handle.

Also, ideally the job of cpuidle is not to handle side effects of suspend.
It should expose the interfaces which "handle cpuidle 'during' suspend"
or any other operation, which the subsystems call during that respective
operation.

The fix demands that during suspend, no cpus should be allowed to enter
deep C-states. The interface cpuidle_uninstall_idle_handler() in cpuidle
ensures that. Not just that it also kicks all the cpus which are already
in idle out of their idle states which was being done during cpu hotplug
through a CPU_DYING_FROZEN callbacks.

Now the question arises about when during suspend should
cpuidle_uninstall_idle_handler() be called. Since we are dealing with
drivers it seems best to call this function during dpm_suspend().
Delaying the call till dpm_suspend_noirq() does no harm, as long as it is
before cpu_hotplug_begin() to avoid race conditions with cpu hotpulg
operations. In dpm_suspend_noirq(), it would be wise to place this call
before suspend_device_irqs() to avoid ugly interactions with the same.

Ananlogously, during resume.

References:
[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/674075.
[2] http://marc.info/?l=linux-pm&amp;m=133958534231884&amp;w=2

Reported-and-tested-by: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Signed-off-by: Preeti U Murthy &lt;preeti@linux.vnet.ibm.com&gt;
Reviewed-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Add preliminary support for cpuidle, v2</title>
<updated>2012-07-03T17:07:42Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-07-03T17:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cbc9ef0287ab764d3da0129efa673808df641fe3'/>
<id>urn:sha1:cbc9ef0287ab764d3da0129efa673808df641fe3</id>
<content type='text'>
On some systems there are CPU cores located in the same power
domains as I/O devices.  Then, power can only be removed from the
domain if all I/O devices in it are not in use and the CPU core
is idle.  Add preliminary support for that to the generic PM domains
framework.

First, the platform is expected to provide a cpuidle driver with one
extra state designated for use with the generic PM domains code.
This state should be initially disabled and its exit_latency value
should be set to whatever time is needed to bring up the CPU core
itself after restoring power to it, not including the domain's
power on latency.  Its .enter() callback should point to a procedure
that will remove power from the domain containing the CPU core at
the end of the CPU power transition.

The remaining characteristics of the extra cpuidle state, referred to
as the "domain" cpuidle state below, (e.g. power usage, target
residency) should be populated in accordance with the properties of
the hardware.

Next, the platform should execute genpd_attach_cpuidle() on the PM
domain containing the CPU core.  That will cause the generic PM
domains framework to treat that domain in a special way such that:

 * When all devices in the domain have been suspended and it is about
   to be turned off, the states of the devices will be saved, but
   power will not be removed from the domain.  Instead, the "domain"
   cpuidle state will be enabled so that power can be removed from
   the domain when the CPU core is idle and the state has been chosen
   as the target by the cpuidle governor.

 * When the first I/O device in the domain is resumed and
   __pm_genpd_poweron(() is called for the first time after
   power has been removed from the domain, the "domain" cpuidle
   state will be disabled to avoid subsequent surprise power removals
   via cpuidle.

The effective exit_latency value of the "domain" cpuidle state
depends on the time needed to bring up the CPU core itself after
restoring power to it as well as on the power on latency of the
domain containing the CPU core.  Thus the "domain" cpuidle state's
exit_latency has to be recomputed every time the domain's power on
latency is updated, which may happen every time power is restored
to the domain, if the measured power on latency is greater than
the latency stored in the corresponding generic_pm_domain structure.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
</content>
</entry>
<entry>
<title>PM / cpuidle: Add driver reference counter</title>
<updated>2012-07-03T17:06:25Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-06-16T13:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6e797a078824b30afbfae6cc4b1c2b21c51761ef'/>
<id>urn:sha1:6e797a078824b30afbfae6cc4b1c2b21c51761ef</id>
<content type='text'>
Add a reference counter for the cpuidle driver, so that it can't
be unregistered when it is in use.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>cpuidle: move field disable from per-driver to per-cpu</title>
<updated>2012-07-03T17:05:31Z</updated>
<author>
<name>ShuoX Liu</name>
<email>shuox.liu@intel.com</email>
</author>
<published>2012-07-03T17:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dc7fd275ae60ef8edf952aff2a62462f5d892fd4'/>
<id>urn:sha1:dc7fd275ae60ef8edf952aff2a62462f5d892fd4</id>
<content type='text'>
Andrew J.Schorr raises a question.  When he changes the disable setting on
a single CPU, it affects all the other CPUs.  Basically, currently, the
disable field is per-driver instead of per-cpu.  All the C states of the
same driver are shared by all CPU in the same machine.

The patch changes the `disable' field to per-cpu, so we could set this
separately for each cpu.

Signed-off-by: ShuoX Liu &lt;shuox.liu@intel.com&gt;
Reported-by: Andrew J.Schorr &lt;aschorr@telemetry-investments.com&gt;
Reviewed-by: Yanmin Zhang &lt;yanmin_zhang@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>cpuidle: coupled: add parallel barrier function</title>
<updated>2012-06-02T04:49:36Z</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2012-05-08T00:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=20ff51a36b2cd25ee7eb3216b6d02b68935435ba'/>
<id>urn:sha1:20ff51a36b2cd25ee7eb3216b6d02b68935435ba</id>
<content type='text'>
Adds cpuidle_coupled_parallel_barrier, which can be used by coupled
cpuidle state enter functions to handle resynchronization after
determining if any cpu needs to abort.  The normal use case will
be:

static bool abort_flag;
static atomic_t abort_barrier;

int arch_cpuidle_enter(struct cpuidle_device *dev, ...)
{
	if (arch_turn_off_irq_controller()) {
	   	/* returns an error if an irq is pending and would be lost
		   if idle continued and turned off power */
		abort_flag = true;
	}

	cpuidle_coupled_parallel_barrier(dev, &amp;abort_barrier);

	if (abort_flag) {
	   	/* One of the cpus didn't turn off it's irq controller */
	   	arch_turn_on_irq_controller();
		return -EINTR;
	}

	/* continue with idle */
	...
}

This will cause all cpus to abort idle together if one of them needs
to abort.

Reviewed-by: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Tested-by: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Tested-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Colin Cross &lt;ccross@android.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
</entry>
</feed>
