diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/irq/spurious.c | 2 | ||||
| -rw-r--r-- | kernel/power/hibernate.c | 23 | ||||
| -rw-r--r-- | kernel/power/main.c | 3 | ||||
| -rw-r--r-- | kernel/power/qos.c | 1 |
4 files changed, 21 insertions, 8 deletions
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index aa57d5da18c1..b5f4742693c0 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
| @@ -115,7 +115,7 @@ static int misrouted_irq(int irq) | |||
| 115 | struct irq_desc *desc; | 115 | struct irq_desc *desc; |
| 116 | int i, ok = 0; | 116 | int i, ok = 0; |
| 117 | 117 | ||
| 118 | if (atomic_inc_return(&irq_poll_active) == 1) | 118 | if (atomic_inc_return(&irq_poll_active) != 1) |
| 119 | goto out; | 119 | goto out; |
| 120 | 120 | ||
| 121 | irq_poll_cpu = smp_processor_id(); | 121 | irq_poll_cpu = smp_processor_id(); |
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index b4511b6d3ef9..196c01268ebd 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c | |||
| @@ -55,6 +55,8 @@ enum { | |||
| 55 | 55 | ||
| 56 | static int hibernation_mode = HIBERNATION_SHUTDOWN; | 56 | static int hibernation_mode = HIBERNATION_SHUTDOWN; |
| 57 | 57 | ||
| 58 | static bool freezer_test_done; | ||
| 59 | |||
| 58 | static const struct platform_hibernation_ops *hibernation_ops; | 60 | static const struct platform_hibernation_ops *hibernation_ops; |
| 59 | 61 | ||
| 60 | /** | 62 | /** |
| @@ -347,6 +349,17 @@ int hibernation_snapshot(int platform_mode) | |||
| 347 | if (error) | 349 | if (error) |
| 348 | goto Close; | 350 | goto Close; |
| 349 | 351 | ||
| 352 | if (hibernation_test(TEST_FREEZER) || | ||
| 353 | hibernation_testmode(HIBERNATION_TESTPROC)) { | ||
| 354 | |||
| 355 | /* | ||
| 356 | * Indicate to the caller that we are returning due to a | ||
| 357 | * successful freezer test. | ||
| 358 | */ | ||
| 359 | freezer_test_done = true; | ||
| 360 | goto Close; | ||
| 361 | } | ||
| 362 | |||
| 350 | error = dpm_prepare(PMSG_FREEZE); | 363 | error = dpm_prepare(PMSG_FREEZE); |
| 351 | if (error) | 364 | if (error) |
| 352 | goto Complete_devices; | 365 | goto Complete_devices; |
| @@ -641,15 +654,13 @@ int hibernate(void) | |||
| 641 | if (error) | 654 | if (error) |
| 642 | goto Finish; | 655 | goto Finish; |
| 643 | 656 | ||
| 644 | if (hibernation_test(TEST_FREEZER)) | ||
| 645 | goto Thaw; | ||
| 646 | |||
| 647 | if (hibernation_testmode(HIBERNATION_TESTPROC)) | ||
| 648 | goto Thaw; | ||
| 649 | |||
| 650 | error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); | 657 | error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM); |
| 651 | if (error) | 658 | if (error) |
| 652 | goto Thaw; | 659 | goto Thaw; |
| 660 | if (freezer_test_done) { | ||
| 661 | freezer_test_done = false; | ||
| 662 | goto Thaw; | ||
| 663 | } | ||
| 653 | 664 | ||
| 654 | if (in_suspend) { | 665 | if (in_suspend) { |
| 655 | unsigned int flags = 0; | 666 | unsigned int flags = 0; |
diff --git a/kernel/power/main.c b/kernel/power/main.c index 71f49fe4377e..36e0f0903c32 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
| @@ -290,13 +290,14 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr, | |||
| 290 | if (*s && len == strlen(*s) && !strncmp(buf, *s, len)) | 290 | if (*s && len == strlen(*s) && !strncmp(buf, *s, len)) |
| 291 | break; | 291 | break; |
| 292 | } | 292 | } |
| 293 | if (state < PM_SUSPEND_MAX && *s) | 293 | if (state < PM_SUSPEND_MAX && *s) { |
| 294 | error = enter_state(state); | 294 | error = enter_state(state); |
| 295 | if (error) { | 295 | if (error) { |
| 296 | suspend_stats.fail++; | 296 | suspend_stats.fail++; |
| 297 | dpm_save_failed_errno(error); | 297 | dpm_save_failed_errno(error); |
| 298 | } else | 298 | } else |
| 299 | suspend_stats.success++; | 299 | suspend_stats.success++; |
| 300 | } | ||
| 300 | #endif | 301 | #endif |
| 301 | 302 | ||
| 302 | Exit: | 303 | Exit: |
diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 56db75147186..995e3bd3417b 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c | |||
| @@ -70,6 +70,7 @@ static struct pm_qos_constraints cpu_dma_constraints = { | |||
| 70 | }; | 70 | }; |
| 71 | static struct pm_qos_object cpu_dma_pm_qos = { | 71 | static struct pm_qos_object cpu_dma_pm_qos = { |
| 72 | .constraints = &cpu_dma_constraints, | 72 | .constraints = &cpu_dma_constraints, |
| 73 | .name = "cpu_dma_latency", | ||
| 73 | }; | 74 | }; |
| 74 | 75 | ||
| 75 | static BLOCKING_NOTIFIER_HEAD(network_lat_notifier); | 76 | static BLOCKING_NOTIFIER_HEAD(network_lat_notifier); |
