<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/acpi/processor_idle.c, branch v3.8</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=v3.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-01-18T23:28:22Z</updated>
<entry>
<title>ACPI / processor: Get power info before updating the C-states</title>
<updated>2013-01-18T23:28:22Z</updated>
<author>
<name>Thomas Schlichter</name>
<email>thomas.schlichter@web.de</email>
</author>
<published>2013-01-18T23:28:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f427e5f1cf75bba84cccdac1d8a90552d9ae1065'/>
<id>urn:sha1:f427e5f1cf75bba84cccdac1d8a90552d9ae1065</id>
<content type='text'>
acpi_processor_get_power_info() has to be called before
acpi_processor_setup_cpuidle_states() to have the latest
information available. This fixes the missing C-state information
after AC--&gt;DC transition.

Signed-off-by: Thomas Schlichter &lt;thomas.schlichter@web.de&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI / cpuidle: Fix NULL pointer issues when cpuidle is disabled</title>
<updated>2013-01-18T12:43:43Z</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2013-01-16T22:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b88a634a903d9670aa5f2f785aa890628ce0dece'/>
<id>urn:sha1:b88a634a903d9670aa5f2f785aa890628ce0dece</id>
<content type='text'>
If cpuidle is disabled, that means that:

	per_cpu(acpi_cpuidle_device, pr-&gt;id)

is set to NULL as the acpi_processor_power_init ends up failing at

	 retval = cpuidle_register_driver(&amp;acpi_idle_driver)

(in acpi_processor_power_init) and never sets the per_cpu idle
device.  So when acpi_processor_hotplug on CPU online notification
tries to reference said device it crashes:

cpu 3 spinlock event irq 62
BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
IP: [&lt;ffffffff81381013&gt;] acpi_processor_setup_cpuidle_cx+0x3f/0x105
PGD a259b067 PUD ab38b067 PMD 0
Oops: 0002 [#1] SMP
odules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi libcrc32c crc32c nouveau mxm_wmi wmi radeon ttm sg sr_mod sd_mod cdrom ata_generic ata_piix libata crc32c_intel scsi_mod atl1c i915 fbcon tileblit font bitblit softcursor drm_kms_helper video xen_blkfront xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea xenfs xen_privcmd mperf
CPU 1
Pid: 3047, comm: bash Not tainted 3.8.0-rc3upstream-00250-g165c029 #1 MSI MS-7680/H61M-P23 (MS-7680)
RIP: e030:[&lt;ffffffff81381013&gt;]  [&lt;ffffffff81381013&gt;] acpi_processor_setup_cpuidle_cx+0x3f/0x105
RSP: e02b:ffff88001742dca8  EFLAGS: 00010202
RAX: 0000000000010be9 RBX: ffff8800a0a61800 RCX: ffff880105380000
RDX: 0000000000000003 RSI: 0000000000000200 RDI: ffff8800a0a61800
RBP: ffff88001742dce8 R08: ffffffff81812360 R09: 0000000000000200
R10: aaaaaaaaaaaaaaaa R11: 0000000000000001 R12: ffff8800a0a61800
R13: 00000000ffffff01 R14: 0000000000000000 R15: ffffffff81a907a0
FS:  00007fd6942f7700(0000) GS:ffff880105280000(0000) knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000004 CR3: 00000000a6773000 CR4: 0000000000042660
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process bash (pid: 3047, threadinfo ffff88001742c000, task ffff880017944000)
Stack:
 0000000000000150 ffff880100f59e00 ffff88001742dcd8 ffff8800a0a61800
 0000000000000000 00000000ffffff01 0000000000000000 ffffffff81a907a0
 ffff88001742dd18 ffffffff813815b1 ffff88001742dd08 ffffffff810ae336
Call Trace:
 [&lt;ffffffff813815b1&gt;] acpi_processor_hotplug+0x7c/0x9f
 [&lt;ffffffff810ae336&gt;] ? schedule_delayed_work_on+0x16/0x20
 [&lt;ffffffff8137ee8f&gt;] acpi_cpu_soft_notify+0x90/0xca
 [&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

This patch fixes it.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle: Measure idle state durations with monotonic clock</title>
<updated>2012-11-27T13:17:58Z</updated>
<author>
<name>Julius Werner</name>
<email>jwerner@chromium.org</email>
</author>
<published>2012-11-27T13:17:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a474a515497ef3566cfc17a2cab3d54d6d50ff1c'/>
<id>urn:sha1:a474a515497ef3566cfc17a2cab3d54d6d50ff1c</id>
<content type='text'>
Many cpuidle drivers measure their time spent in an idle state by
reading the wallclock time before and after idling and calculating the
difference. This leads to erroneous results when the wallclock time gets
updated by another processor in the meantime, adding that clock
adjustment to the idle state's time counter.

If the clock adjustment was negative, the result is even worse due to an
erroneous cast from int to unsigned long long of the last_residency
variable. The negative 32 bit integer will zero-extend and result in a
forward time jump of roughly four billion milliseconds or 1.3 hours on
the idle state residency counter.

This patch changes all affected cpuidle drivers to either use the
monotonic clock for their measurements or make use of the generic time
measurement wrapper in cpuidle.c, which was already working correctly.
Some superfluous CLIs/STIs in the ACPI code are removed (interrupts
should always already be disabled before entering the idle function, and
not get reenabled until the generic wrapper has performed its second
measurement). It also removes the erroneous cast, making sure that
negative residency values are applied correctly even though they should
not appear anymore.

Signed-off-by: Julius Werner &lt;jwerner@chromium.org&gt;
Reviewed-by: Preeti U Murthy &lt;preeti@linux.vnet.ibm.com&gt;
Tested-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-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>cpuidle / ACPI: fix potential NULL pointer dereference</title>
<updated>2012-10-09T02:51:27Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2012-10-08T00:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8b1b59dc8e42a47c4ce541bd1767ffac206b29c'/>
<id>urn:sha1:e8b1b59dc8e42a47c4ce541bd1767ffac206b29c</id>
<content type='text'>
The dereference should be moved below the NULL test.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
</entry>
<entry>
<title>cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure</title>
<updated>2012-09-17T21:01:56Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2012-09-17T21:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d339dcbb56d8d70c1b959aff87d74adc3a84eea'/>
<id>urn:sha1:3d339dcbb56d8d70c1b959aff87d74adc3a84eea</id>
<content type='text'>
Currently we have the cpuidle_device field in the acpi_processor_power structure.
This adds a dependency between processor.h and cpuidle.h

Although it is not a real problem, removing this dependency has the benefit of
separating a bit more the cpuidle code from the rest of the acpi code.
Also, the compilation should be a bit improved because we do no longer
include cpuidle.h in processor.h. The preprocessor was generating 30418 loc
and with this patch it generates 30256 loc for processor_thermal.c, a file
which is not concerned at all by cpuidle, like processor_perflib.c and
processor_throttling.c.

That may sound ridiculous, but "small streams make big rivers" :P

This patch moves this field into a static global per cpu variable like what is
done in the intel_idle driver.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>ACPI / processor: remove unused function parameter</title>
<updated>2012-09-15T20:42:54Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2012-09-15T20:42:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38a991b625ae3898f18149f8fa287338647a4c9f'/>
<id>urn:sha1:38a991b625ae3898f18149f8fa287338647a4c9f</id>
<content type='text'>
The 'device' parameter is not used neither in acpi_processor_power_init
and acpi_processor_power_exit. This patch removes it.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>cpuidle / ACPI : remove power from acpi_processor_cx structure</title>
<updated>2012-09-05T13:13:48Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2012-09-05T13:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c59687f8466df36633d937cc298aad465d704990'/>
<id>urn:sha1:c59687f8466df36633d937cc298aad465d704990</id>
<content type='text'>
Remove the unused power field from struct struct acpi_processor_cx.

[rjw: Modified changelog.]

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.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.shady.money/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.shady.money/linux/commit/?id=ec033d0a02901551346b9f43f8ff9bad51378891'/>
<id>urn:sha1:ec033d0a02901551346b9f43f8ff9bad51378891</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'pm-acpi'</title>
<updated>2012-07-18T22:03:35Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-07-18T22:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6148d38b37ce9468cdf5a37ca49b4ac5c091e8fa'/>
<id>urn:sha1:6148d38b37ce9468cdf5a37ca49b4ac5c091e8fa</id>
<content type='text'>
* pm-acpi: (24 commits)
  olpc-xo15-sci: Use struct dev_pm_ops for power management
  ACPI / PM: Drop PM callbacks from the ACPI bus type
  ACPI / PM: Drop legacy driver PM callbacks that are not used any more
  ACPI / PM: Do not execute legacy driver PM callbacks
  acpi_power_meter: Use struct dev_pm_ops for power management
  fujitsu-tablet: Use struct dev_pm_ops for power management
  classmate-laptop: Use struct dev_pm_ops for power management
  xo15-ebook: Use struct dev_pm_ops for power management
  toshiba_bluetooth: Use struct dev_pm_ops for power management
  panasonic-laptop: Use struct dev_pm_ops for power management
  sony-laptop: Use struct dev_pm_ops for power management
  hp_accel: Use struct dev_pm_ops for power management
  toshiba_acpi: Use struct dev_pm_ops for power management
  ACPI: Use struct dev_pm_ops for power management in the SBS driver
  ACPI: Use struct dev_pm_ops for power management in the power driver
  ACPI: Use struct dev_pm_ops for power management in the button driver
  ACPI: Use struct dev_pm_ops for power management in the battery driver
  ACPI: Use struct dev_pm_ops for power management in the AC driver
  ACPI: Use struct dev_pm_ops for power management in processor driver
  ACPI: Use struct dev_pm_ops for power management in the thermal driver
  ...
</content>
</entry>
</feed>
