From 72cb1a9422f9173a0994cd4649bf90e83fb9bc76 Mon Sep 17 00:00:00 2001 From: Stephen Dickey Date: Mon, 21 Jun 2021 13:37:25 -0700 Subject: [PATCH] sched/walt: prevent lockup when system is suspending When the system is suspending, the console itself can be locked up for a period of time. Unfortunately, pr_err will wait until the console is unlocked, causing significant delays. This causes a defect that seems to point to walt_pause. Fix this by ensuring that all pr_err statements are eliminated by using printk_deferred throughout walt_pause. This will ensure that the operation is not locked on console access. Change-Id: Id2e93a33d5c272fe0ee9b6f18bef5eb8ad4de07d Signed-off-by: Stephen Dickey --- kernel/sched/walt/walt_pause.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/sched/walt/walt_pause.c b/kernel/sched/walt/walt_pause.c index a80b6d72f9a0..474fd6dce21c 100644 --- a/kernel/sched/walt/walt_pause.c +++ b/kernel/sched/walt/walt_pause.c @@ -71,7 +71,7 @@ int walt_pause_cpus(struct cpumask *cpus) ret = pause_cpus(cpus); if (ret < 0) { - pr_err("pause_cpus failure ret=%d cpus=%*pbl\n", ret, + printk_deferred("pause_cpus failure ret=%d cpus=%*pbl\n", ret, cpumask_pr_args(&requested_cpus)); /* ref counts recorded, suppress failure */ @@ -103,7 +103,7 @@ int walt_resume_cpus(struct cpumask *cpus) ret = resume_cpus(cpus); if (ret < 0) { - pr_err("resume_cpus failure ret=%d cpus=%*pbl\n", ret, + printk_deferred("resume_cpus failure ret=%d cpus=%*pbl\n", ret, cpumask_pr_args(&requested_cpus)); /* ref counts recorded, suppress failure */ @@ -169,7 +169,7 @@ static void walt_pause_online_workfn(struct work_struct *work) mutex_unlock(&pause_lock); if (ret < 0) - pr_err("pause_cpus during online failure ret=%d cpus=%*pb1\n", ret, + printk_deferred("pause_cpus during online failure ret=%d cpus=%*pb1\n", ret, cpumask_pr_args(&re_pause_cpus)); } @@ -194,6 +194,6 @@ void walt_pause_init(void) walt_pause_hp_online, NULL); if (ret < 0) - pr_err("failure to register cpuhp online state ret=%d\n", ret); + printk_deferred("failure to register cpuhp online state ret=%d\n", ret); } #endif /* CONFIG_HOTPLUG_CPU */