diff options
| author | Michal Hocko <mhocko@suse.cz> | 2015-02-11 18:26:18 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:06:03 -0500 |
| commit | 35536ae170f01fb7e5ca032d5324d03e9e5a36bd (patch) | |
| tree | e32089cb24a522156533c167178781e3497e613a /kernel/power | |
| parent | 63a8ca9b2084fa5bd91aa380532f18e361764109 (diff) | |
PM: convert printk to pr_* equivalent
While touching this area let's convert printk to pr_*. This also makes
the printing of continuation lines done properly.
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power')
| -rw-r--r-- | kernel/power/process.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c index 5a6ec8678b9a..3ac45f192e9f 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
| @@ -84,8 +84,8 @@ static int try_to_freeze_tasks(bool user_only) | |||
| 84 | elapsed_msecs = elapsed_msecs64; | 84 | elapsed_msecs = elapsed_msecs64; |
| 85 | 85 | ||
| 86 | if (todo) { | 86 | if (todo) { |
| 87 | printk("\n"); | 87 | pr_cont("\n"); |
| 88 | printk(KERN_ERR "Freezing of tasks %s after %d.%03d seconds " | 88 | pr_err("Freezing of tasks %s after %d.%03d seconds " |
| 89 | "(%d tasks refusing to freeze, wq_busy=%d):\n", | 89 | "(%d tasks refusing to freeze, wq_busy=%d):\n", |
| 90 | wakeup ? "aborted" : "failed", | 90 | wakeup ? "aborted" : "failed", |
| 91 | elapsed_msecs / 1000, elapsed_msecs % 1000, | 91 | elapsed_msecs / 1000, elapsed_msecs % 1000, |
| @@ -101,7 +101,7 @@ static int try_to_freeze_tasks(bool user_only) | |||
| 101 | read_unlock(&tasklist_lock); | 101 | read_unlock(&tasklist_lock); |
| 102 | } | 102 | } |
| 103 | } else { | 103 | } else { |
| 104 | printk("(elapsed %d.%03d seconds) ", elapsed_msecs / 1000, | 104 | pr_cont("(elapsed %d.%03d seconds) ", elapsed_msecs / 1000, |
| 105 | elapsed_msecs % 1000); | 105 | elapsed_msecs % 1000); |
| 106 | } | 106 | } |
| 107 | 107 | ||
| @@ -155,7 +155,7 @@ int freeze_processes(void) | |||
| 155 | atomic_inc(&system_freezing_cnt); | 155 | atomic_inc(&system_freezing_cnt); |
| 156 | 156 | ||
| 157 | pm_wakeup_clear(); | 157 | pm_wakeup_clear(); |
| 158 | printk("Freezing user space processes ... "); | 158 | pr_info("Freezing user space processes ... "); |
| 159 | pm_freezing = true; | 159 | pm_freezing = true; |
| 160 | oom_kills_saved = oom_kills_count(); | 160 | oom_kills_saved = oom_kills_count(); |
| 161 | error = try_to_freeze_tasks(true); | 161 | error = try_to_freeze_tasks(true); |
| @@ -171,13 +171,13 @@ int freeze_processes(void) | |||
| 171 | if (oom_kills_count() != oom_kills_saved && | 171 | if (oom_kills_count() != oom_kills_saved && |
| 172 | !check_frozen_processes()) { | 172 | !check_frozen_processes()) { |
| 173 | __usermodehelper_set_disable_depth(UMH_ENABLED); | 173 | __usermodehelper_set_disable_depth(UMH_ENABLED); |
| 174 | printk("OOM in progress."); | 174 | pr_cont("OOM in progress."); |
| 175 | error = -EBUSY; | 175 | error = -EBUSY; |
| 176 | } else { | 176 | } else { |
| 177 | printk("done."); | 177 | pr_cont("done."); |
| 178 | } | 178 | } |
| 179 | } | 179 | } |
| 180 | printk("\n"); | 180 | pr_cont("\n"); |
| 181 | BUG_ON(in_atomic()); | 181 | BUG_ON(in_atomic()); |
| 182 | 182 | ||
| 183 | if (error) | 183 | if (error) |
| @@ -197,13 +197,14 @@ int freeze_kernel_threads(void) | |||
| 197 | { | 197 | { |
| 198 | int error; | 198 | int error; |
| 199 | 199 | ||
| 200 | printk("Freezing remaining freezable tasks ... "); | 200 | pr_info("Freezing remaining freezable tasks ... "); |
| 201 | |||
| 201 | pm_nosig_freezing = true; | 202 | pm_nosig_freezing = true; |
| 202 | error = try_to_freeze_tasks(false); | 203 | error = try_to_freeze_tasks(false); |
| 203 | if (!error) | 204 | if (!error) |
| 204 | printk("done."); | 205 | pr_cont("done."); |
| 205 | 206 | ||
| 206 | printk("\n"); | 207 | pr_cont("\n"); |
| 207 | BUG_ON(in_atomic()); | 208 | BUG_ON(in_atomic()); |
| 208 | 209 | ||
| 209 | if (error) | 210 | if (error) |
| @@ -224,7 +225,7 @@ void thaw_processes(void) | |||
| 224 | 225 | ||
| 225 | oom_killer_enable(); | 226 | oom_killer_enable(); |
| 226 | 227 | ||
| 227 | printk("Restarting tasks ... "); | 228 | pr_info("Restarting tasks ... "); |
| 228 | 229 | ||
| 229 | __usermodehelper_set_disable_depth(UMH_FREEZING); | 230 | __usermodehelper_set_disable_depth(UMH_FREEZING); |
| 230 | thaw_workqueues(); | 231 | thaw_workqueues(); |
| @@ -243,7 +244,7 @@ void thaw_processes(void) | |||
| 243 | usermodehelper_enable(); | 244 | usermodehelper_enable(); |
| 244 | 245 | ||
| 245 | schedule(); | 246 | schedule(); |
| 246 | printk("done.\n"); | 247 | pr_cont("done.\n"); |
| 247 | trace_suspend_resume(TPS("thaw_processes"), 0, false); | 248 | trace_suspend_resume(TPS("thaw_processes"), 0, false); |
| 248 | } | 249 | } |
| 249 | 250 | ||
| @@ -252,7 +253,7 @@ void thaw_kernel_threads(void) | |||
| 252 | struct task_struct *g, *p; | 253 | struct task_struct *g, *p; |
| 253 | 254 | ||
| 254 | pm_nosig_freezing = false; | 255 | pm_nosig_freezing = false; |
| 255 | printk("Restarting kernel threads ... "); | 256 | pr_info("Restarting kernel threads ... "); |
| 256 | 257 | ||
| 257 | thaw_workqueues(); | 258 | thaw_workqueues(); |
| 258 | 259 | ||
| @@ -264,5 +265,5 @@ void thaw_kernel_threads(void) | |||
| 264 | read_unlock(&tasklist_lock); | 265 | read_unlock(&tasklist_lock); |
| 265 | 266 | ||
| 266 | schedule(); | 267 | schedule(); |
| 267 | printk("done.\n"); | 268 | pr_cont("done.\n"); |
| 268 | } | 269 | } |
