aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/psci/psci_checker.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/psci/psci_checker.c')
-rw-r--r--drivers/firmware/psci/psci_checker.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/firmware/psci/psci_checker.c b/drivers/firmware/psci/psci_checker.c
index 08c85099d4d0..f3659443f8c2 100644
--- a/drivers/firmware/psci/psci_checker.c
+++ b/drivers/firmware/psci/psci_checker.c
@@ -359,16 +359,16 @@ static int suspend_test_thread(void *arg)
359 for (;;) { 359 for (;;) {
360 /* Needs to be set first to avoid missing a wakeup. */ 360 /* Needs to be set first to avoid missing a wakeup. */
361 set_current_state(TASK_INTERRUPTIBLE); 361 set_current_state(TASK_INTERRUPTIBLE);
362 if (kthread_should_stop()) { 362 if (kthread_should_park())
363 __set_current_state(TASK_RUNNING);
364 break; 363 break;
365 }
366 schedule(); 364 schedule();
367 } 365 }
368 366
369 pr_info("CPU %d suspend test results: success %d, shallow states %d, errors %d\n", 367 pr_info("CPU %d suspend test results: success %d, shallow states %d, errors %d\n",
370 cpu, nb_suspend, nb_shallow_sleep, nb_err); 368 cpu, nb_suspend, nb_shallow_sleep, nb_err);
371 369
370 kthread_parkme();
371
372 return nb_err; 372 return nb_err;
373} 373}
374 374
@@ -433,8 +433,10 @@ static int suspend_tests(void)
433 433
434 434
435 /* Stop and destroy all threads, get return status. */ 435 /* Stop and destroy all threads, get return status. */
436 for (i = 0; i < nb_threads; ++i) 436 for (i = 0; i < nb_threads; ++i) {
437 err += kthread_park(threads[i]);
437 err += kthread_stop(threads[i]); 438 err += kthread_stop(threads[i]);
439 }
438 out: 440 out:
439 cpuidle_resume_and_unlock(); 441 cpuidle_resume_and_unlock();
440 kfree(threads); 442 kfree(threads);