diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 16:14:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 16:14:19 -0400 |
| commit | 19c1940feab777bb037c665a09f495d08a6c4e6c (patch) | |
| tree | 68d4de31f30c9d69a1f1ea080b8a69ce61e1ead5 /kernel | |
| parent | 7c574cf6aeb75920ba4d3af937bb1b3c42785ac4 (diff) | |
| parent | d715a226b0b3dae48865d05e8c36175a8f75a809 (diff) | |
Merge tag 'pm+acpi-3.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI and power management updates from Rafael Wysocki:
"These are fixups on top of the previous PM+ACPI pull request,
regression fixes (ACPI hotplug, cpufreq ppc-corenet), other bug fixes
(ACPI reset, cpufreq), new PM trace points for system suspend
profiling and a copyright notice update.
Specifics:
- I didn't remember correctly that the Hans de Goede's ACPI video
patches actually didn't flip the video.use_native_backlight
default, although we had discussed that and decided to do that.
Since I said we would do that in the previous PM+ACPI pull request,
make that change for real now.
- ACPI bus check notifications for PCI host bridges don't cause the
bus below the host bridge to be checked for changes as they should
because of a mistake in the ACPI-based PCI hotplug (ACPIPHP)
subsystem that forgets to add hotplug contexts to PCI host bridge
ACPI device objects. Create hotplug contexts for PCI host bridges
too as appropriate.
- Revert recent cpufreq commit related to the big.LITTLE cpufreq
driver that breaks arm64 builds.
- Fix for a regression in the ppc-corenet cpufreq driver introduced
during the 3.15 cycle and causing the driver to use the remainder
from do_div instead of the quotient. From Ed Swarthout.
- Resets triggered by panic activate a BUG_ON() in vmalloc.c on
systems where the ACPI reset register is located in memory address
space. Fix from Randy Wright.
- Fix for a problem with cpufreq governors that decisions made by
them may be suboptimal due to the fact that deferrable timers are
used by them for CPU load sampling. From Srivatsa S Bhat.
- Fix for a problem with the Tegra cpufreq driver where the CPU
frequency is temporarily switched to a "stable" level that is
different from both the initial and target frequencies during
transitions which causes udelay() to expire earlier than it should
sometimes. From Viresh Kumar.
- New trace points and rework of some existing trace points for
system suspend/resume profiling from Todd Brandt.
- Assorted cpufreq fixes and cleanups from Stratos Karafotis and
Viresh Kumar.
- Copyright notice update for suspend-and-cpuhotplug.txt from
Srivatsa S Bhat"
* tag 'pm+acpi-3.16-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges
PM / sleep: trace events for device PM callbacks
cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR
cpufreq: tegra: update comment for clarity
cpufreq: intel_pstate: Remove duplicate CPU ID check
cpufreq: Mark CPU0 driver with CPUFREQ_NEED_INITIAL_FREQ_CHECK flag
PM / Documentation: Update copyright in suspend-and-cpuhotplug.txt
cpufreq: governor: remove copy_prev_load from 'struct cpu_dbs_common_info'
cpufreq: governor: Be friendly towards latency-sensitive bursty workloads
PM / sleep: trace events for suspend/resume
cpufreq: ppc-corenet-cpu-freq: do_div use quotient
Revert "cpufreq: Enable big.LITTLE cpufreq driver on arm64"
cpufreq: Tegra: implement intermediate frequency callbacks
cpufreq: add support for intermediate (stable) frequencies
ACPI / video: Change the default for video.use_native_backlight to 1
ACPI: Fix bug when ACPI reset register is implemented in system memory
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cpu.c | 5 | ||||
| -rw-r--r-- | kernel/power/hibernate.c | 3 | ||||
| -rw-r--r-- | kernel/power/process.c | 3 | ||||
| -rw-r--r-- | kernel/power/suspend.c | 14 |
4 files changed, 23 insertions, 2 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index acf791c55b71..a343bde710b1 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/gfp.h> | 20 | #include <linux/gfp.h> |
| 21 | #include <linux/suspend.h> | 21 | #include <linux/suspend.h> |
| 22 | #include <linux/lockdep.h> | 22 | #include <linux/lockdep.h> |
| 23 | #include <trace/events/power.h> | ||
| 23 | 24 | ||
| 24 | #include "smpboot.h" | 25 | #include "smpboot.h" |
| 25 | 26 | ||
| @@ -520,7 +521,9 @@ int disable_nonboot_cpus(void) | |||
| 520 | for_each_online_cpu(cpu) { | 521 | for_each_online_cpu(cpu) { |
| 521 | if (cpu == first_cpu) | 522 | if (cpu == first_cpu) |
| 522 | continue; | 523 | continue; |
| 524 | trace_suspend_resume(TPS("CPU_OFF"), cpu, true); | ||
| 523 | error = _cpu_down(cpu, 1); | 525 | error = _cpu_down(cpu, 1); |
| 526 | trace_suspend_resume(TPS("CPU_OFF"), cpu, false); | ||
| 524 | if (!error) | 527 | if (!error) |
| 525 | cpumask_set_cpu(cpu, frozen_cpus); | 528 | cpumask_set_cpu(cpu, frozen_cpus); |
| 526 | else { | 529 | else { |
| @@ -563,7 +566,9 @@ void __ref enable_nonboot_cpus(void) | |||
| 563 | arch_enable_nonboot_cpus_begin(); | 566 | arch_enable_nonboot_cpus_begin(); |
| 564 | 567 | ||
| 565 | for_each_cpu(cpu, frozen_cpus) { | 568 | for_each_cpu(cpu, frozen_cpus) { |
| 569 | trace_suspend_resume(TPS("CPU_ON"), cpu, true); | ||
| 566 | error = _cpu_up(cpu, 1); | 570 | error = _cpu_up(cpu, 1); |
| 571 | trace_suspend_resume(TPS("CPU_ON"), cpu, false); | ||
| 567 | if (!error) { | 572 | if (!error) { |
| 568 | pr_info("CPU%d is up\n", cpu); | 573 | pr_info("CPU%d is up\n", cpu); |
| 569 | continue; | 574 | continue; |
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index df88d55dc436..49e0a20fd010 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/syscore_ops.h> | 28 | #include <linux/syscore_ops.h> |
| 29 | #include <linux/ctype.h> | 29 | #include <linux/ctype.h> |
| 30 | #include <linux/genhd.h> | 30 | #include <linux/genhd.h> |
| 31 | #include <trace/events/power.h> | ||
| 31 | 32 | ||
| 32 | #include "power.h" | 33 | #include "power.h" |
| 33 | 34 | ||
| @@ -292,7 +293,9 @@ static int create_image(int platform_mode) | |||
| 292 | 293 | ||
| 293 | in_suspend = 1; | 294 | in_suspend = 1; |
| 294 | save_processor_state(); | 295 | save_processor_state(); |
| 296 | trace_suspend_resume(TPS("machine_suspend"), PM_EVENT_HIBERNATE, true); | ||
| 295 | error = swsusp_arch_suspend(); | 297 | error = swsusp_arch_suspend(); |
| 298 | trace_suspend_resume(TPS("machine_suspend"), PM_EVENT_HIBERNATE, false); | ||
| 296 | if (error) | 299 | if (error) |
| 297 | printk(KERN_ERR "PM: Error %d creating hibernation image\n", | 300 | printk(KERN_ERR "PM: Error %d creating hibernation image\n", |
| 298 | error); | 301 | error); |
diff --git a/kernel/power/process.c b/kernel/power/process.c index 06ec8869dbf1..0ca8d83e2369 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
| 18 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
| 19 | #include <linux/kmod.h> | 19 | #include <linux/kmod.h> |
| 20 | #include <trace/events/power.h> | ||
| 20 | 21 | ||
| 21 | /* | 22 | /* |
| 22 | * Timeout for stopping processes | 23 | * Timeout for stopping processes |
| @@ -175,6 +176,7 @@ void thaw_processes(void) | |||
| 175 | struct task_struct *g, *p; | 176 | struct task_struct *g, *p; |
| 176 | struct task_struct *curr = current; | 177 | struct task_struct *curr = current; |
| 177 | 178 | ||
| 179 | trace_suspend_resume(TPS("thaw_processes"), 0, true); | ||
| 178 | if (pm_freezing) | 180 | if (pm_freezing) |
| 179 | atomic_dec(&system_freezing_cnt); | 181 | atomic_dec(&system_freezing_cnt); |
| 180 | pm_freezing = false; | 182 | pm_freezing = false; |
| @@ -201,6 +203,7 @@ void thaw_processes(void) | |||
| 201 | 203 | ||
| 202 | schedule(); | 204 | schedule(); |
| 203 | printk("done.\n"); | 205 | printk("done.\n"); |
| 206 | trace_suspend_resume(TPS("thaw_processes"), 0, false); | ||
| 204 | } | 207 | } |
| 205 | 208 | ||
| 206 | void thaw_kernel_threads(void) | 209 | void thaw_kernel_threads(void) |
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 963e6d0f050b..4dd8822f732a 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c | |||
| @@ -177,7 +177,9 @@ static int suspend_prepare(suspend_state_t state) | |||
| 177 | if (error) | 177 | if (error) |
| 178 | goto Finish; | 178 | goto Finish; |
| 179 | 179 | ||
| 180 | trace_suspend_resume(TPS("freeze_processes"), 0, true); | ||
| 180 | error = suspend_freeze_processes(); | 181 | error = suspend_freeze_processes(); |
| 182 | trace_suspend_resume(TPS("freeze_processes"), 0, false); | ||
| 181 | if (!error) | 183 | if (!error) |
| 182 | return 0; | 184 | return 0; |
| 183 | 185 | ||
| @@ -240,7 +242,9 @@ static int suspend_enter(suspend_state_t state, bool *wakeup) | |||
| 240 | * all the devices are suspended. | 242 | * all the devices are suspended. |
| 241 | */ | 243 | */ |
| 242 | if (state == PM_SUSPEND_FREEZE) { | 244 | if (state == PM_SUSPEND_FREEZE) { |
| 245 | trace_suspend_resume(TPS("machine_suspend"), state, true); | ||
| 243 | freeze_enter(); | 246 | freeze_enter(); |
| 247 | trace_suspend_resume(TPS("machine_suspend"), state, false); | ||
| 244 | goto Platform_wake; | 248 | goto Platform_wake; |
| 245 | } | 249 | } |
| 246 | 250 | ||
| @@ -256,7 +260,11 @@ static int suspend_enter(suspend_state_t state, bool *wakeup) | |||
| 256 | if (!error) { | 260 | if (!error) { |
| 257 | *wakeup = pm_wakeup_pending(); | 261 | *wakeup = pm_wakeup_pending(); |
| 258 | if (!(suspend_test(TEST_CORE) || *wakeup)) { | 262 | if (!(suspend_test(TEST_CORE) || *wakeup)) { |
| 263 | trace_suspend_resume(TPS("machine_suspend"), | ||
| 264 | state, true); | ||
| 259 | error = suspend_ops->enter(state); | 265 | error = suspend_ops->enter(state); |
| 266 | trace_suspend_resume(TPS("machine_suspend"), | ||
| 267 | state, false); | ||
| 260 | events_check_enabled = false; | 268 | events_check_enabled = false; |
| 261 | } | 269 | } |
| 262 | syscore_resume(); | 270 | syscore_resume(); |
| @@ -294,7 +302,6 @@ int suspend_devices_and_enter(suspend_state_t state) | |||
| 294 | if (need_suspend_ops(state) && !suspend_ops) | 302 | if (need_suspend_ops(state) && !suspend_ops) |
| 295 | return -ENOSYS; | 303 | return -ENOSYS; |
| 296 | 304 | ||
| 297 | trace_machine_suspend(state); | ||
| 298 | if (need_suspend_ops(state) && suspend_ops->begin) { | 305 | if (need_suspend_ops(state) && suspend_ops->begin) { |
| 299 | error = suspend_ops->begin(state); | 306 | error = suspend_ops->begin(state); |
| 300 | if (error) | 307 | if (error) |
| @@ -331,7 +338,6 @@ int suspend_devices_and_enter(suspend_state_t state) | |||
| 331 | else if (state == PM_SUSPEND_FREEZE && freeze_ops->end) | 338 | else if (state == PM_SUSPEND_FREEZE && freeze_ops->end) |
| 332 | freeze_ops->end(); | 339 | freeze_ops->end(); |
| 333 | 340 | ||
| 334 | trace_machine_suspend(PWR_EVENT_EXIT); | ||
| 335 | return error; | 341 | return error; |
| 336 | 342 | ||
| 337 | Recover_platform: | 343 | Recover_platform: |
| @@ -365,6 +371,7 @@ static int enter_state(suspend_state_t state) | |||
| 365 | { | 371 | { |
| 366 | int error; | 372 | int error; |
| 367 | 373 | ||
| 374 | trace_suspend_resume(TPS("suspend_enter"), state, true); | ||
| 368 | if (state == PM_SUSPEND_FREEZE) { | 375 | if (state == PM_SUSPEND_FREEZE) { |
| 369 | #ifdef CONFIG_PM_DEBUG | 376 | #ifdef CONFIG_PM_DEBUG |
| 370 | if (pm_test_level != TEST_NONE && pm_test_level <= TEST_CPUS) { | 377 | if (pm_test_level != TEST_NONE && pm_test_level <= TEST_CPUS) { |
| @@ -382,9 +389,11 @@ static int enter_state(suspend_state_t state) | |||
| 382 | if (state == PM_SUSPEND_FREEZE) | 389 | if (state == PM_SUSPEND_FREEZE) |
| 383 | freeze_begin(); | 390 | freeze_begin(); |
| 384 | 391 | ||
| 392 | trace_suspend_resume(TPS("sync_filesystems"), 0, true); | ||
| 385 | printk(KERN_INFO "PM: Syncing filesystems ... "); | 393 | printk(KERN_INFO "PM: Syncing filesystems ... "); |
| 386 | sys_sync(); | 394 | sys_sync(); |
| 387 | printk("done.\n"); | 395 | printk("done.\n"); |
| 396 | trace_suspend_resume(TPS("sync_filesystems"), 0, false); | ||
| 388 | 397 | ||
| 389 | pr_debug("PM: Preparing system for %s sleep\n", pm_states[state].label); | 398 | pr_debug("PM: Preparing system for %s sleep\n", pm_states[state].label); |
| 390 | error = suspend_prepare(state); | 399 | error = suspend_prepare(state); |
| @@ -394,6 +403,7 @@ static int enter_state(suspend_state_t state) | |||
| 394 | if (suspend_test(TEST_FREEZER)) | 403 | if (suspend_test(TEST_FREEZER)) |
| 395 | goto Finish; | 404 | goto Finish; |
| 396 | 405 | ||
| 406 | trace_suspend_resume(TPS("suspend_enter"), state, false); | ||
| 397 | pr_debug("PM: Entering %s sleep\n", pm_states[state].label); | 407 | pr_debug("PM: Entering %s sleep\n", pm_states[state].label); |
| 398 | pm_restrict_gfp_mask(); | 408 | pm_restrict_gfp_mask(); |
| 399 | error = suspend_devices_and_enter(state); | 409 | error = suspend_devices_and_enter(state); |
