Skip to content

Commit

Permalink
printk: Rename resume_console to console_resume_all
Browse files Browse the repository at this point in the history
The function resume_console has a misleading name,  since it resumes all
consoles, so rename it accordingly.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Link: https://lore.kernel.org/r/20250226-printk-renaming-v1-2-0b878577f2e6@suse.com
[pmladek@suse.com: Fixed typo in the commit message.]
Signed-off-by: Petr Mladek <pmladek@suse.com>
  • Loading branch information
Marcos Paulo de Souza authored and Petr Mladek committed Mar 11, 2025
1 parent e9cec44 commit 63830ae
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion include/linux/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ extern bool console_suspend_enabled;

/* Suspend and resume console messages over PM events */
extern void console_suspend_all(void);
extern void resume_console(void);
extern void console_resume_all(void);

int mda_console_init(void);

Expand Down
2 changes: 1 addition & 1 deletion kernel/kexec_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ int kernel_kexec(void)
Resume_devices:
dpm_resume_end(PMSG_RESTORE);
Resume_console:
resume_console();
console_resume_all();
thaw_processes();
Restore_console:
pm_restore_console();
Expand Down
8 changes: 4 additions & 4 deletions kernel/power/hibernate.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ int hibernation_snapshot(int platform_mode)
if (error || !in_suspend)
pm_restore_gfp_mask();

resume_console();
console_resume_all();
dpm_complete(msg);

Close:
Expand Down Expand Up @@ -561,7 +561,7 @@ int hibernation_restore(int platform_mode)
}
dpm_resume_end(PMSG_RECOVER);
pm_restore_gfp_mask();
resume_console();
console_resume_all();
pm_restore_console();
return error;
}
Expand Down Expand Up @@ -634,7 +634,7 @@ int hibernation_platform_enter(void)
Resume_devices:
entering_platform_hibernation = false;
dpm_resume_end(PMSG_RESTORE);
resume_console();
console_resume_all();

Close:
hibernation_ops->end();
Expand Down Expand Up @@ -920,7 +920,7 @@ int hibernate_quiet_exec(int (*func)(void *data), void *data)
dpm_resume:
dpm_resume(PMSG_THAW);

resume_console();
console_resume_all();

dpm_complete:
dpm_complete(PMSG_THAW);
Expand Down
6 changes: 3 additions & 3 deletions kernel/power/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ int suspend_devices_and_enter(suspend_state_t state)
suspend_test_start();
dpm_resume_end(PMSG_RESUME);
suspend_test_finish("resume devices");
trace_suspend_resume(TPS("resume_console"), state, true);
resume_console();
trace_suspend_resume(TPS("resume_console"), state, false);
trace_suspend_resume(TPS("console_resume_all"), state, true);
console_resume_all();
trace_suspend_resume(TPS("console_resume_all"), state, false);

Close:
platform_resume_end(state);
Expand Down
2 changes: 1 addition & 1 deletion kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2760,7 +2760,7 @@ void console_suspend_all(void)
synchronize_srcu(&console_srcu);
}

void resume_console(void)
void console_resume_all(void)
{
struct console_flush_type ft;
struct console *con;
Expand Down
2 changes: 1 addition & 1 deletion tools/power/pm-graph/config/custom-timeline-functions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ syscore_suspend:
arch_enable_nonboot_cpus_end:
syscore_resume:
acpi_pm_finish:
resume_console:
console_resume_all:
acpi_pm_end:
pm_restore_gfp_mask:
thaw_processes:
Expand Down
4 changes: 2 additions & 2 deletions tools/power/pm-graph/sleepgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class SystemValues:
'arch_enable_nonboot_cpus_end': {},
'syscore_resume': {},
'acpi_pm_finish': {},
'resume_console': {},
'console_resume_all': {},
'acpi_pm_end': {},
'pm_restore_gfp_mask': {},
'thaw_processes': {},
Expand Down Expand Up @@ -3459,7 +3459,7 @@ def parseTraceLog(live=False):
tracewatch = ['irq_wakeup']
if sysvals.usekprobes:
tracewatch += ['sync_filesystems', 'freeze_processes', 'syscore_suspend',
'syscore_resume', 'resume_console', 'thaw_processes', 'CPU_ON',
'syscore_resume', 'console_resume_all', 'thaw_processes', 'CPU_ON',
'CPU_OFF', 'acpi_suspend']

# extract the callgraph and traceevent data
Expand Down

0 comments on commit 63830ae

Please sign in to comment.