<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/idle, branch v3.2.39</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.39</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.39'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-02-06T04:33:38Z</updated>
<entry>
<title>intel_idle: Don't register CPU notifier if we are not running.</title>
<updated>2013-02-06T04:33:38Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2013-01-16T22:40:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=24d64ff793d880d298aec64369babcdfd61e6bc2'/>
<id>urn:sha1:24d64ff793d880d298aec64369babcdfd61e6bc2</id>
<content type='text'>
commit 6f8c2e7933679f54b6478945dc72e59ef9a3d5e0 upstream.

The 'intel_idle_probe' probes the CPU and sets the CPU notifier.
But if later on during the module initialization we fail (say
in cpuidle_register_driver), we stop loading, but we neglect
to unregister the CPU notifier.  This means that during CPU
hotplug events the system will fail:

calling  intel_idle_init+0x0/0x326 @ 1
intel_idle: MWAIT substates: 0x1120
intel_idle: v0.4 model 0x2A
intel_idle: lapic_timer_reliable_states 0xffffffff
intel_idle: intel_idle yielding to none
initcall intel_idle_init+0x0/0x326 returned -19 after 14 usecs

... some time later, offlining and onlining a CPU:

cpu 3 spinlock event irq 62
BUG: unable to ] __cpuidle_register_device+0x1c/0x120
PGD 99b8b067 PUD 99b95067 PMD 0
Oops: 0000 [#1] SMP
Modules linked in: xen_evtchn nouveau mxm_wmi wmi radeon ttm i915 fbcon tileblit font atl1c bitblit softcursor drm_kms_helper video xen_blkfront xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea xenfs xen_privcmd mperf
CPU 0
Pid: 2302, comm: udevd Not tainted 3.8.0-rc3upstream-00249-g09ad159 #1 MSI MS-7680/H61M-P23 (MS-7680)
RIP: e030:[&lt;ffffffff814d956c&gt;]  [&lt;ffffffff814d956c&gt;] __cpuidle_register_device+0x1c/0x120
RSP: e02b:ffff88009dacfcb8  EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff880105380000 RCX: 000000000000001c
RDX: 0000000000000000 RSI: 0000000000000055 RDI: ffff880105380000
RBP: ffff88009dacfce8 R08: ffffffff81a4f048 R09: 0000000000000008
R10: 0000000000000008 R11: 0000000000000000 R12: ffff880105380000
R13: 00000000ffffffdd R14: 0000000000000000 R15: ffffffff81a523d0
FS:  00007f37bd83b7a0(0000) GS:ffff880105200000(0000) knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000008 CR3: 00000000a09ea000 CR4: 0000000000042660
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process udevd (pid: 2302, threadinfo ffff88009dace000, task ffff88009afb47f0)
Stack:
 ffffffff8107f2d0 ffffffff810c2fb7 ffff88009dacfce8 00000000ffffffea
 ffff880105380000 00000000ffffffdd ffff88009dacfd08 ffffffff814d9882
 0000000000000003 ffff880105380000 ffff88009dacfd28 ffffffff81340afd
Call Trace:
 [&lt;ffffffff8107f2d0&gt;] ? collect_cpu_info_local+0x30/0x30
 [&lt;ffffffff810c2fb7&gt;] ? __might_sleep+0xe7/0x100
 [&lt;ffffffff814d9882&gt;] cpuidle_register_device+0x32/0x70
 [&lt;ffffffff81340afd&gt;] intel_idle_cpu_init+0xad/0x110
 [&lt;ffffffff81340bc8&gt;] cpu_hotplug_notify+0x68/0x80
 [&lt;ffffffff8166023d&gt;] notifier_call_chain+0x4d/0x70
 [&lt;ffffffff810bc369&gt;] __raw_notifier_call_chain+0x9/0x10
 [&lt;ffffffff81094a4b&gt;] __cpu_notify+0x1b/0x30
 [&lt;ffffffff81652cf7&gt;] _cpu_up+0x103/0x14b
 [&lt;ffffffff81652e18&gt;] cpu_up+0xd9/0xec
 [&lt;ffffffff8164a254&gt;] store_online+0x94/0xd0
 [&lt;ffffffff814122fb&gt;] dev_attr_store+0x1b/0x20
 [&lt;ffffffff81216404&gt;] sysfs_write_file+0xf4/0x170
 [&lt;ffffffff811a1024&gt;] vfs_write+0xb4/0x130
 [&lt;ffffffff811a17ea&gt;] sys_write+0x5a/0xa0
 [&lt;ffffffff816643a9&gt;] system_call_fastpath+0x16/0x1b
Code: 03 18 00 c9 c3 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 48 83 ec 30 48 89 5d e8 4c 89 65 f0 48 89 fb 4c 89 6d f8 e8 84 08 00 00 &lt;48&gt; 8b 78 08 49 89 c4 e8 f8 7f c1 ff 89 c2 b8 ea ff ff ff 84 d2
RIP  [&lt;ffffffff814d956c&gt;] __cpuidle_register_device+0x1c/0x120
 RSP &lt;ffff88009dacfcb8&gt;

This patch fixes that by moving the CPU notifier registration
as the last item to be done by the module.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
[bwh: Backported to 3.2: notifier is registered only if we do not have ARAT]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>intel_idle: enable IVB Xeon support</title>
<updated>2012-12-06T11:20:39Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-12-02T13:14:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d670ed5e12954d8fd2b9de49222b1dc5d1723340'/>
<id>urn:sha1:d670ed5e12954d8fd2b9de49222b1dc5d1723340</id>
<content type='text'>
commit 23795e580cad5d6b73d47d51b9074ce3e58bf334 upstream.

IVB Xeon currently shares the same parameters IVB client.

For 3.2, add model number to the switch in intel_idle_probe(), as
there is no device ID table.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>intel_idle: initial IVB support</title>
<updated>2012-12-06T11:20:38Z</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2012-06-01T23:45:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f1c9393d2433fa745eae6b5eabe1acef3ec5baa'/>
<id>urn:sha1:9f1c9393d2433fa745eae6b5eabe1acef3ec5baa</id>
<content type='text'>
commit 6edab08c24f9141d69cfa4683a0a027d86ab303e upstream.

From an OS point of view, IVB looks like SNB, but quicker.

Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
[bwh: Backported to 3.2: add model number to the switch in
 intel_idle_probe(), as there is no device ID table]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>intel_idle: fix API misuse</title>
<updated>2012-01-26T00:13:46Z</updated>
<author>
<name>Shaohua Li</name>
<email>shaohua.li@intel.com</email>
</author>
<published>2012-01-10T23:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=caa3e3bed0bf0ec356101811dcd46c9603ec3788'/>
<id>urn:sha1:caa3e3bed0bf0ec356101811dcd46c9603ec3788</id>
<content type='text'>
commit 39a74fdedd1c1461d6fb6d330b5266886513c98f upstream.

smp_call_function() only lets all other CPUs execute a specific function,
while we expect all CPUs do in intel_idle.  Without the fix, we could have
one cpu which has auto_demotion enabled or has no broadcast timer setup.
Usually we don't see impact because auto demotion just harms power and the
intel_idle init is called in CPU 0, where boradcast timer delivers
interrupt, but this still could be a problem.

Signed-off-by: Shaohua Li &lt;shaohua.li@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>intel idle: Make idle driver more robust</title>
<updated>2012-01-26T00:13:45Z</updated>
<author>
<name>Thomas Renninger</name>
<email>trenn@suse.de</email>
</author>
<published>2011-12-04T21:17:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=872f97c4e073b6e23a232cbdceb212aaac51d7df'/>
<id>urn:sha1:872f97c4e073b6e23a232cbdceb212aaac51d7df</id>
<content type='text'>
commit 5c2a9f06a9cd7194f884cdc88144866235dec07d upstream.

kvm -cpu host passes the original cpuid info to the guest.

Latest kvm version seem to return true for mwait_leaf cpuid
function on recent Intel CPUs. But it does not return mwait
C-states (mwait_substates), instead zero is returned.

While real CPUs seem to always return non-zero values, the intel
idle driver should not get active in kvm (mwait_substates == 0)
case and bail out.
Otherwise a Null pointer exception will happen later when the
cpuidle subsystem tries to get active:
[0.984807] BUG: unable to handle kernel NULL pointer dereference at (null)
[0.984807] IP: [&lt;(null)&gt;] (null)
...
[0.984807][&lt;ffffffff8143cf34&gt;] ? cpuidle_idle_call+0xb4/0x340
[0.984807][&lt;ffffffff8159e7bc&gt;] ? __atomic_notifier_call_chain+0x4c/0x70
[0.984807][&lt;ffffffff81001198&gt;] ? cpu_idle+0x78/0xd0

Reference:
https://bugzilla.novell.com/show_bug.cgi?id=726296

Signed-off-by: Thomas Renninger &lt;trenn@suse.de&gt;
CC: Bruno Friedmann &lt;bruno@ioda-net.ch&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux</title>
<updated>2011-11-07T18:13:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-07T18:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3c00303206c3a1ccd86579efdc90bc35f140962e'/>
<id>urn:sha1:3c00303206c3a1ccd86579efdc90bc35f140962e</id>
<content type='text'>
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  cpuidle: Single/Global registration of idle states
  cpuidle: Split cpuidle_state structure and move per-cpu statistics fields
  cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev-&gt;prepare()
  cpuidle: Move dev-&gt;last_residency update to driver enter routine; remove dev-&gt;last_state
  ACPI: Fix CONFIG_ACPI_DOCK=n compiler warning
  ACPI: Export FADT pm_profile integer value to userspace
  thermal: Prevent polling from happening during system suspend
  ACPI: Drop ACPI_NO_HARDWARE_INIT
  ACPI atomicio: Convert width in bits to bytes in __acpi_ioremap_fast()
  PNPACPI: Simplify disabled resource registration
  ACPI: Fix possible recursive locking in hwregs.c
  ACPI: use kstrdup()
  mrst pmu: update comment
  tools/power turbostat: less verbose debugging
</content>
</entry>
<entry>
<title>cpuidle: Single/Global registration of idle states</title>
<updated>2011-11-07T02:13:58Z</updated>
<author>
<name>Deepthi Dharwar</name>
<email>deepthi@linux.vnet.ibm.com</email>
</author>
<published>2011-10-28T10:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=46bcfad7a819bd17ac4e831b04405152d59784ab'/>
<id>urn:sha1:46bcfad7a819bd17ac4e831b04405152d59784ab</id>
<content type='text'>
This patch makes the cpuidle_states structure global (single copy)
instead of per-cpu. The statistics needed on per-cpu basis
by the governor are kept per-cpu. This simplifies the cpuidle
subsystem as state registration is done by single cpu only.
Having single copy of cpuidle_states saves memory. Rare case
of asymmetric C-states can be handled within the cpuidle driver
and architectures such as POWER do not have asymmetric C-states.

Having single/global registration of all the idle states,
dynamic C-state transitions on x86 are handled by
the boot cpu. Here, the boot cpu  would disable all the devices,
re-populate the states and later enable all the devices,
irrespective of the cpu that would receive the notification first.

Reference:
https://lkml.org/lkml/2011/4/25/83

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Split cpuidle_state structure and move per-cpu statistics fields</title>
<updated>2011-11-07T02:13:49Z</updated>
<author>
<name>Deepthi Dharwar</name>
<email>deepthi@linux.vnet.ibm.com</email>
</author>
<published>2011-10-28T10:50:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4202735e8ab6ecfb0381631a0d0b58fefe0bd4e2'/>
<id>urn:sha1:4202735e8ab6ecfb0381631a0d0b58fefe0bd4e2</id>
<content type='text'>
This is the first step towards global registration of cpuidle
states. The statistics used primarily by the governor are per-cpu
and have to be split from rest of the fields inside cpuidle_state,
which would be made global i.e. single copy. The driver_data field
is also per-cpu and moved.

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Move dev-&gt;last_residency update to driver enter routine; remove dev-&gt;last_state</title>
<updated>2011-11-07T02:13:30Z</updated>
<author>
<name>Deepthi Dharwar</name>
<email>deepthi@linux.vnet.ibm.com</email>
</author>
<published>2011-10-28T10:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e978aa7d7d57d04eb5f88a7507c4fb98577def77'/>
<id>urn:sha1:e978aa7d7d57d04eb5f88a7507c4fb98577def77</id>
<content type='text'>
Cpuidle governor only suggests the state to enter using the
governor-&gt;select() interface, but allows the low level driver to
override the recommended state. The actual entered state
may be different because of software or hardware demotion. Software
demotion is done by the back-end cpuidle driver and can be accounted
correctly. Current cpuidle code uses last_state field to capture the
actual state entered and based on that updates the statistics for the
state entered.

Ideally the driver enter routine should update the counters,
and it should return the state actually entered rather than the time
spent there. The generic cpuidle code should simply handle where
the counters live in the sysfs namespace, not updating the counters.

Reference:
https://lkml.org/lkml/2011/3/25/52

Signed-off-by: Deepthi Dharwar &lt;deepthi@linux.vnet.ibm.com&gt;
Signed-off-by: Trinabh Gupta &lt;g.trinabh@gmail.com&gt;
Tested-by: Jean Pihet &lt;j-pihet@ti.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
</entry>
<entry>
<title>x86: fix up files really needing to include module.h</title>
<updated>2011-10-31T23:30:36Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-27T16:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7c52d55170ce84ddf9c0ad4e020ef1d7a97975a7'/>
<id>urn:sha1:7c52d55170ce84ddf9c0ad4e020ef1d7a97975a7</id>
<content type='text'>
These files aren't just exporting symbols -- they are also defining
a MODULE_LICENSE etc. so give them the full module.h file.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
</feed>
