<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/idle, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-04-09T00:17:43Z</updated>
<entry>
<title>intel_idle: add BXT support</title>
<updated>2016-04-09T00:17:43Z</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2016-04-06T21:00:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5dcef694860100fd16885f052591b1268b764d21'/>
<id>urn:sha1:5dcef694860100fd16885f052591b1268b764d21</id>
<content type='text'>
Broxton has all the HSW C-states, except C3.
BXT C-state timing is slightly different.

Here we trust the IRTL MSRs as authority
on maximum C-state latency, and override the driver's tables
with the values found in the associated IRTL MSRs.
Further we set the target_residency to 1x maximum latency,
trusting the hardware demotion logic.

Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Add KBL support</title>
<updated>2016-04-07T20:11:08Z</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2016-04-06T21:00:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ce093d4de753d6c92cc09366e29d0618a62f542'/>
<id>urn:sha1:3ce093d4de753d6c92cc09366e29d0618a62f542</id>
<content type='text'>
KBL is similar to SKL

Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Add SKX support</title>
<updated>2016-04-07T20:11:06Z</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2016-04-06T21:00:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f9e71657c2c0a8f1c50884ab45794be2854e158e'/>
<id>urn:sha1:f9e71657c2c0a8f1c50884ab45794be2854e158e</id>
<content type='text'>
SKX is similar to BDX

Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Clean up all registered devices on exit.</title>
<updated>2016-04-07T20:11:05Z</updated>
<author>
<name>Richard Cochran</name>
<email>rcochran@linutronix.de</email>
</author>
<published>2016-04-06T21:00:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e66a9ab53641a0f7a440e56f7b35bf5d77494b3'/>
<id>urn:sha1:3e66a9ab53641a0f7a440e56f7b35bf5d77494b3</id>
<content type='text'>
This driver registers cpuidle devices when a CPU comes online, but it
leaves the registrations in place when a CPU goes offline.  The module
exit code only unregisters the currently online CPUs, leaving the
devices for offline CPUs dangling.

This patch changes the driver to clean up all registrations on exit,
even those from CPUs that are offline.

Signed-off-by: Richard Cochran &lt;rcochran@linutronix.de&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Propagate hot plug errors.</title>
<updated>2016-04-07T20:11:02Z</updated>
<author>
<name>Richard Cochran</name>
<email>rcochran@linutronix.de</email>
</author>
<published>2016-04-06T21:00:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08820546e4c30c84d0a1f1a49df055e1719c07ea'/>
<id>urn:sha1:08820546e4c30c84d0a1f1a49df055e1719c07ea</id>
<content type='text'>
If a cpuidle registration error occurs during the hot plug notifier
callback, we should really inform the hot plug machinery instead of
just ignoring the error.  This patch changes the callback to properly
return on error.

Signed-off-by: Richard Cochran &lt;rcochran@linutronix.de&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Don't overreact to a cpuidle registration failure.</title>
<updated>2016-04-07T20:11:00Z</updated>
<author>
<name>Richard Cochran</name>
<email>rcochran@linutronix.de</email>
</author>
<published>2016-04-06T21:00:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b69ef2c099c3e5f11bd5c33a9530d6522f72c9aa'/>
<id>urn:sha1:b69ef2c099c3e5f11bd5c33a9530d6522f72c9aa</id>
<content type='text'>
The helper function, intel_idle_cpu_init, registers one new device
with the cpuidle layer.  If the registration should fail, that
function immediately calls intel_idle_cpuidle_devices_uninit() to
unregister every last CPU's device.  However, it makes no sense to do
so, when called from the hot plug notifier callback.

This patch moves the call to intel_idle_cpuidle_devices_uninit()
outside of the helper function to the one call site that actually
needs to perform the de-registrations.

Signed-off-by: Richard Cochran &lt;rcochran@linutronix.de&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Setup the timer broadcast only on successful driver load.</title>
<updated>2016-04-07T20:10:58Z</updated>
<author>
<name>Richard Cochran</name>
<email>rcochran@linutronix.de</email>
</author>
<published>2016-04-06T21:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2259a819a8d37e472f08c88bc0dd22194754adb4'/>
<id>urn:sha1:2259a819a8d37e472f08c88bc0dd22194754adb4</id>
<content type='text'>
This driver sets the broadcast tick quite early on during probe and does
not clean up again in cast of failure.  This patch moves the setup call
after the registration, placing the on_each_cpu() calls within the global
CPU lock region.

Signed-off-by: Richard Cochran &lt;rcochran@linutronix.de&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Avoid a double free of the per-CPU data.</title>
<updated>2016-04-07T20:10:57Z</updated>
<author>
<name>Richard Cochran</name>
<email>rcochran@linutronix.de</email>
</author>
<published>2016-04-06T21:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca42489d9ee3262482717c83428e087322fdc39c'/>
<id>urn:sha1:ca42489d9ee3262482717c83428e087322fdc39c</id>
<content type='text'>
The helper function, intel_idle_cpuidle_devices_uninit, frees the
globally allocated per-CPU data.  However, this function is invoked
from the hot plug notifier callback at a time when freeing that data
is not safe.

If the call to cpuidle_register_driver() should fail (say, due to lack
of memory), then the driver will free its per-CPU region.  On the
*next* CPU_ONLINE event, the driver will happily use the region again
and even free it again if the failure repeats.

This patch fixes the issue by moving the call to free_percpu() outside
of the helper function at the two call sites that actually need to
free the per-CPU data.

Signed-off-by: Richard Cochran &lt;rcochran@linutronix.de&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Fix dangling registration on error path.</title>
<updated>2016-04-07T20:10:56Z</updated>
<author>
<name>Richard Cochran</name>
<email>rcochran@linutronix.de</email>
</author>
<published>2016-04-06T21:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9df69ccd1322e87eee10f28036fad9e6c71f8dd'/>
<id>urn:sha1:e9df69ccd1322e87eee10f28036fad9e6c71f8dd</id>
<content type='text'>
In the module_init() method, if the per-CPU allocation fails, then the
active cpuidle registration is not cleaned up.  This patch fixes the
issue by attempting the allocation before registration, and then
cleaning it up again on registration failure.

Signed-off-by: Richard Cochran &lt;rcochran@linutronix.de&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>intel_idle: Fix deallocation order on the driver exit path.</title>
<updated>2016-04-07T20:10:54Z</updated>
<author>
<name>Richard Cochran</name>
<email>rcochran@linutronix.de</email>
</author>
<published>2016-04-06T21:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51319918bcc31f901646fc66348d41cf74ee0566'/>
<id>urn:sha1:51319918bcc31f901646fc66348d41cf74ee0566</id>
<content type='text'>
In the module_exit() method, this driver first frees its per-CPU
pointer, then unregisters a callback making use of the pointer.
Furthermore, the function, intel_idle_cpuidle_devices_uninit, is racy
against CPU hot plugging as it calls for_each_online_cpu().

This patch corrects the issues by unregistering first on the exit path
while holding the hot plug lock.

Signed-off-by: Richard Cochran &lt;rcochran@linutronix.de&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
