<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/power, branch v4.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=v4.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-09-16T00:59:58Z</updated>
<entry>
<title>PM / runtime: Use _rcuidle for runtime suspend tracepoints</title>
<updated>2016-09-16T00:59:58Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-04-26T17:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=778935778c3b88e5152a88765850009006ef2e32'/>
<id>urn:sha1:778935778c3b88e5152a88765850009006ef2e32</id>
<content type='text'>
Further testing with false negatives suppressed by commit 293e2421fe25
("rcu: Remove superfluous versions of rcu_read_lock_sched_held()")
identified a few more unprotected uses of RCU from the idle loop.
Because RCU actively ignores idle-loop code (for energy-efficiency
reasons, among other things), using RCU from the idle loop can result
in too-short grace periods, in turn resulting in arbitrary misbehavior.

The affected function is rpm_suspend().

The resulting lockdep-RCU splat is as follows:

------------------------------------------------------------------------

Warning from omap3

===============================
[ INFO: suspicious RCU usage. ]
4.6.0-rc5-next-20160426+ #1112 Not tainted
-------------------------------
include/trace/events/rpm.h:63 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 0
RCU used illegally from extended quiescent state!
1 lock held by swapper/0/0:
 #0:  (&amp;(&amp;dev-&gt;power.lock)-&gt;rlock){-.-...}, at: [&lt;c052ee24&gt;] __pm_runtime_suspend+0x54/0x84

stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.6.0-rc5-next-20160426+ #1112
Hardware name: Generic OMAP36xx (Flattened Device Tree)
[&lt;c0110308&gt;] (unwind_backtrace) from [&lt;c010c3a8&gt;] (show_stack+0x10/0x14)
[&lt;c010c3a8&gt;] (show_stack) from [&lt;c047fec8&gt;] (dump_stack+0xb0/0xe4)
[&lt;c047fec8&gt;] (dump_stack) from [&lt;c052d7b4&gt;] (rpm_suspend+0x604/0x7e4)
[&lt;c052d7b4&gt;] (rpm_suspend) from [&lt;c052ee34&gt;] (__pm_runtime_suspend+0x64/0x84)
[&lt;c052ee34&gt;] (__pm_runtime_suspend) from [&lt;c04bf3bc&gt;] (omap2_gpio_prepare_for_idle+0x5c/0x70)
[&lt;c04bf3bc&gt;] (omap2_gpio_prepare_for_idle) from [&lt;c01255e8&gt;] (omap_sram_idle+0x140/0x244)
[&lt;c01255e8&gt;] (omap_sram_idle) from [&lt;c0126b48&gt;] (omap3_enter_idle_bm+0xfc/0x1ec)
[&lt;c0126b48&gt;] (omap3_enter_idle_bm) from [&lt;c0601db8&gt;] (cpuidle_enter_state+0x80/0x3d4)
[&lt;c0601db8&gt;] (cpuidle_enter_state) from [&lt;c0183c74&gt;] (cpu_startup_entry+0x198/0x3a0)
[&lt;c0183c74&gt;] (cpu_startup_entry) from [&lt;c0b00c0c&gt;] (start_kernel+0x354/0x3c8)
[&lt;c0b00c0c&gt;] (start_kernel) from [&lt;8000807c&gt;] (0x8000807c)

------------------------------------------------------------------------

Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / runtime: Add _rcuidle suffix to allow rpm_idle() use from idle</title>
<updated>2016-08-31T01:00:59Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-04-26T20:03:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7737ce964d944dd07e25b0f569edcd550ede18c'/>
<id>urn:sha1:d7737ce964d944dd07e25b0f569edcd550ede18c</id>
<content type='text'>
This commit appends a few _rcuidle suffixes to fix the following
RCU-used-from-idle bug:

&gt; ===============================
&gt; [ INFO: suspicious RCU usage. ]
&gt; 4.6.0-rc5-next-20160426+ #1116 Not tainted
&gt; -------------------------------
&gt; include/trace/events/rpm.h:95 suspicious rcu_dereference_check() usage!
&gt;
&gt; other info that might help us debug this:
&gt;
&gt;
&gt; RCU used illegally from idle CPU!
&gt; rcu_scheduler_active = 1, debug_locks = 0
&gt; RCU used illegally from extended quiescent state!
&gt; 1 lock held by swapper/0/0:
&gt;  #0:  (&amp;(&amp;dev-&gt;power.lock)-&gt;rlock){-.-...}, at: [&lt;c052cc2c&gt;] __rpm_callback+0x58/0x60
&gt;
&gt; stack backtrace:
&gt; CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.6.0-rc5-next-20160426+ #1116
&gt; Hardware name: Generic OMAP36xx (Flattened Device Tree)
&gt; [&lt;c0110290&gt;] (unwind_backtrace) from [&lt;c010c3a8&gt;] (show_stack+0x10/0x14)
&gt; [&lt;c010c3a8&gt;] (show_stack) from [&lt;c047fd68&gt;] (dump_stack+0xb0/0xe4)
&gt; [&lt;c047fd68&gt;] (dump_stack) from [&lt;c052d5d0&gt;] (rpm_suspend+0x580/0x768)
&gt; [&lt;c052d5d0&gt;] (rpm_suspend) from [&lt;c052ec58&gt;] (__pm_runtime_suspend+0x64/0x84)
&gt; [&lt;c052ec58&gt;] (__pm_runtime_suspend) from [&lt;c04bf25c&gt;] (omap2_gpio_prepare_for_idle+0x5c/0x70)
&gt; [&lt;c04bf25c&gt;] (omap2_gpio_prepare_for_idle) from [&lt;c0125568&gt;] (omap_sram_idle+0x140/0x244)
&gt; [&lt;c0125568&gt;] (omap_sram_idle) from [&lt;c01269dc&gt;] (omap3_enter_idle_bm+0xfc/0x1ec)
&gt; [&lt;c01269dc&gt;] (omap3_enter_idle_bm) from [&lt;c0601bdc&gt;] (cpuidle_enter_state+0x80/0x3d4)
&gt; [&lt;c0601bdc&gt;] (cpuidle_enter_state) from [&lt;c0183b08&gt;] (cpu_startup_entry+0x198/0x3a0)
&gt; [&lt;c0183b08&gt;] (cpu_startup_entry) from [&lt;c0b00c0c&gt;] (start_kernel+0x354/0x3c8)
&gt; [&lt;c0b00c0c&gt;] (start_kernel) from [&lt;8000807c&gt;] (0x8000807c)

In the immortal words of Steven Rostedt, "*Whack* *Whack* *Whack*!!!"

Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
WhACKED-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / runtime: Add _rcuidle suffix to allow rpm_resume() to be called from idle</title>
<updated>2016-08-31T00:59:20Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-04-26T20:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d44c950e9398e639e124014e5872480a37b67259'/>
<id>urn:sha1:d44c950e9398e639e124014e5872480a37b67259</id>
<content type='text'>
This commit applies another _rcuidle suffix to fix an RCU use from
idle.

&gt; ===============================
&gt; [ INFO: suspicious RCU usage. ]
&gt; 4.6.0-rc5-next-20160426+ #1122 Not tainted
&gt; -------------------------------
&gt; include/trace/events/rpm.h:69 suspicious rcu_dereference_check() usage!
&gt;
&gt; other info that might help us debug this:
&gt;
&gt;
&gt; RCU used illegally from idle CPU!
&gt; rcu_scheduler_active = 1, debug_locks = 0
&gt; RCU used illegally from extended quiescent state!
&gt; 1 lock held by swapper/0/0:
&gt;  #0:  (&amp;(&amp;dev-&gt;power.lock)-&gt;rlock){-.-...}, at: [&lt;c052e3dc&gt;] __pm_runtime_resume+0x3c/0x64
&gt;
&gt; stack backtrace:
&gt; CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.6.0-rc5-next-20160426+ #1122
&gt; Hardware name: Generic OMAP36xx (Flattened Device Tree)
&gt; [&lt;c0110290&gt;] (unwind_backtrace) from [&lt;c010c3a8&gt;] (show_stack+0x10/0x14)
&gt; [&lt;c010c3a8&gt;] (show_stack) from [&lt;c047fd68&gt;] (dump_stack+0xb0/0xe4)
&gt; [&lt;c047fd68&gt;] (dump_stack) from [&lt;c052e178&gt;] (rpm_resume+0x5cc/0x7f4)
&gt; [&lt;c052e178&gt;] (rpm_resume) from [&lt;c052e3ec&gt;] (__pm_runtime_resume+0x4c/0x64)
&gt; [&lt;c052e3ec&gt;] (__pm_runtime_resume) from [&lt;c04bf2c4&gt;] (omap2_gpio_resume_after_idle+0x54/0x68)
&gt; [&lt;c04bf2c4&gt;] (omap2_gpio_resume_after_idle) from [&lt;c01269dc&gt;] (omap3_enter_idle_bm+0xfc/0x1ec)
&gt; [&lt;c01269dc&gt;] (omap3_enter_idle_bm) from [&lt;c060198c&gt;] (cpuidle_enter_state+0x80/0x3d4)
&gt; [&lt;c060198c&gt;] (cpuidle_enter_state) from [&lt;c0183b08&gt;] (cpu_startup_entry+0x198/0x3a0)
&gt; [&lt;c0183b08&gt;] (cpu_startup_entry) from [&lt;c0b00c0c&gt;] (start_kernel+0x354/0x3c8)
&gt; [&lt;c0b00c0c&gt;] (start_kernel) from [&lt;8000807c&gt;] (0x8000807c)

Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'pm-extra-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm</title>
<updated>2016-08-06T03:26:16Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-08-06T03:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=11d8ec408d0aa2dae7ca89f95e497b8f22427b20'/>
<id>urn:sha1:11d8ec408d0aa2dae7ca89f95e497b8f22427b20</id>
<content type='text'>
Pull more power management updates from Rafael Wysocki:
 "A few more fixes and cleanups in the x86-64 low-level hibernation
  code, PM core, cpufreq (Kconfig and intel_pstate), and the operating
  points framework.

  Specifics:

   - Prevent the low-level assembly hibernate code on x86-64 from
     referring to __PAGE_OFFSET directly as a symbol which doesn't work
     when the kernel identity mapping base is randomized, in which case
     __PAGE_OFFSET is a variable (Rafael Wysocki).

   - Avoid selecting CPU_FREQ_STAT by default as the statistics are not
     required for proper cpufreq operation (Borislav Petkov).

   - Add Skylake-X and Broadwell-X IDs to the intel_pstate's list of
     processors where out-of-band (OBB) control of P-states is possible
     and if that is in use, intel_pstate should not attempt to manage
     P-states (Srinivas Pandruvada).

   - Drop some unnecessary checks from the wakeup IRQ handling code in
     the PM core (Markus Elfring).

   - Reduce the number operating performance point (OPP) lookups in one
     of the OPP framework's helper functions (Jisheng Zhang)"

* tag 'pm-extra-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  x86/power/64: Do not refer to __PAGE_OFFSET from assembly code
  cpufreq: Do not default-yes CPU_FREQ_STAT
  cpufreq: intel_pstate: Add more out-of-band IDs
  PM / OPP: optimize dev_pm_opp_set_rate() performance a bit
  PM-wakeup: Delete unnecessary checks before three function calls
</content>
</entry>
<entry>
<title>Merge tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux</title>
<updated>2016-08-05T13:48:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-08-05T13:48:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c84239d595dc6ffe39f0f03dae2f64ed200db95'/>
<id>urn:sha1:6c84239d595dc6ffe39f0f03dae2f64ed200db95</id>
<content type='text'>
Pull RTC updates from Alexandre Belloni:
 "RTC for 4.8

  Cleanups:
   - huge cleanup of rtc-generic and char/genrtc this allowed to cleanup
     rtc-cmos, rtc-sh, rtc-m68k, rtc-powerpc and rtc-parisc
   - move mn10300 to rtc-cmos

  Subsystem:
   - fix wakealarms after hibernate
   - multiples fixes for rctest
   - simplify implementations of .read_alarm

  New drivers:
   - Maxim MAX6916

  Drivers:
   - ds1307: fix weekday
   - m41t80: add wakeup support
   - pcf85063: add support for PCF85063A variant
   - rv8803: extend i2c fix and other fixes
   - s35390a: fix alarm reading, this fixes instant reboot after
     shutdown for QNAP TS-41x
   - s3c: clock fixes"

* tag 'rtc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (65 commits)
  rtc: rv8803: Clear V1F when setting the time
  rtc: rv8803: Stop the clock while setting the time
  rtc: rv8803: Always apply the I²C workaround
  rtc: rv8803: Fix read day of week
  rtc: rv8803: Remove the check for valid time
  rtc: rv8803: Kconfig: Indicate rx8900 support
  rtc: asm9260: remove .owner field for driver
  rtc: at91sam9: Fix missing spin_lock_init()
  rtc: m41t80: add suspend handlers for alarm IRQ
  rtc: m41t80: make it a real error message
  rtc: pcf85063: Add support for the PCF85063A device
  rtc: pcf85063: fix year range
  rtc: hym8563: in .read_alarm set .tm_sec to 0 to signal minute accuracy
  rtc: explicitly set tm_sec = 0 for drivers with minute accurancy
  rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq()
  rtc: s3c: Remove unnecessary call to disable already disabled clock
  rtc: abx80x: use devm_add_action_or_reset()
  rtc: m41t80: use devm_add_action_or_reset()
  rtc: fix a typo and reduce three empty lines to one
  rtc: s35390a: improve two comments in .set_alarm
  ...
</content>
</entry>
<entry>
<title>Merge branches 'pm-sleep', 'pm-cpufreq', 'pm-core' and 'pm-opp'</title>
<updated>2016-08-05T13:46:55Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-08-05T13:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2b3b80de5cda284c885721e873f9a6e90f68ef8'/>
<id>urn:sha1:e2b3b80de5cda284c885721e873f9a6e90f68ef8</id>
<content type='text'>
* pm-sleep:
  x86/power/64: Do not refer to __PAGE_OFFSET from assembly code

* pm-cpufreq:
  cpufreq: Do not default-yes CPU_FREQ_STAT
  cpufreq: intel_pstate: Add more out-of-band IDs

* pm-core:
  PM-wakeup: Delete unnecessary checks before three function calls

* pm-opp:
  PM / OPP: optimize dev_pm_opp_set_rate() performance a bit
</content>
</entry>
<entry>
<title>PM / OPP: optimize dev_pm_opp_set_rate() performance a bit</title>
<updated>2016-07-28T21:54:16Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2016-07-25T06:11:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=067b7ce083df6c69e67345bdba658ab59274cc01'/>
<id>urn:sha1:067b7ce083df6c69e67345bdba658ab59274cc01</id>
<content type='text'>
In dev_pm_opp_set_rate(), _find_opp_table() is called 4 times: once by
_get_opp_clk(), once by dev_pm_opp_set_rate() itself, and twice by
dev_pm_opp_find_freq_ceil(). If there are several opp_tables in the
system, three times of opp table finding is a big waste. This patch
reduced the call of _find_opp_table() to twice.

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM-wakeup: Delete unnecessary checks before three function calls</title>
<updated>2016-07-28T21:51:04Z</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2016-07-23T15:04:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f48ec8a1c070f00c3d675b664e8b3879e5286e5'/>
<id>urn:sha1:4f48ec8a1c070f00c3d675b664e8b3879e5286e5</id>
<content type='text'>
The following functions test whether their argument is NULL
and then return immediately.
 * dev_pm_arm_wake_irq
 * dev_pm_disarm_wake_irq
 * wakeup_source_unregister

Thus the test around the calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
[ rjw: Minor whitespace adjustments ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'pm-core', 'pm-clk', 'pm-domains' and 'pm-pci'</title>
<updated>2016-07-25T11:45:27Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-07-25T11:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fa70db3f19a183af5334edea5ad9e417c58faa5c'/>
<id>urn:sha1:fa70db3f19a183af5334edea5ad9e417c58faa5c</id>
<content type='text'>
* pm-core:
  PM / runtime: Asynchronous "idle" in pm_runtime_allow()
  PM / runtime: print error when activating a child to unactive parent

* pm-clk:
  PM / clk: Add support for adding a specific clock from device-tree
  PM / clk: export symbols for existing pm_clk_&lt;...&gt; API fcns

* pm-domains:
  PM / Domains: Convert pm_genpd_init() to return an error code
  PM / Domains: Stop/start devices during system PM suspend/resume in genpd
  PM / Domains: Allow runtime PM during system PM phases
  PM / Runtime: Avoid resuming devices again in pm_runtime_force_resume()
  PM / Domains: Remove redundant pm_request_idle() call in genpd
  PM / Domains: Remove redundant wrapper functions for system PM
  PM / Domains: Allow genpd to power on during system PM phases

* pm-pci:
  PCI / PM: check all fields in pci_set_platform_pm()
</content>
</entry>
<entry>
<title>PM / runtime: Asynchronous "idle" in pm_runtime_allow()</title>
<updated>2016-07-01T23:50:39Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-06-29T00:53:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe7450b05fddebd5a76a5ad280a5ae9a82ce336f'/>
<id>urn:sha1:fe7450b05fddebd5a76a5ad280a5ae9a82ce336f</id>
<content type='text'>
Arjan reports that it takes a relatively long time to enable runtime
PM for multiple devices at system startup, because all writes to the
"control" attribute in sysfs are handled synchronously and if the
device is suspended as a result of the write, it will block until
that operation is complete.

That may be avoided by passing the RPM_ASYNC flag to rpm_idle()
in pm_runtime_allow() which will make it execute the device's
"idle" callback asynchronously, so writes to "control" changing
it from "on" to "auto" will return without waiting.

Reported-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
</content>
</entry>
</feed>
