diff options
| author | John Ogness <[email protected]> | 2022-04-21 21:22:36 +0000 |
|---|---|---|
| committer | Petr Mladek <[email protected]> | 2022-04-22 19:30:57 +0000 |
| commit | faebd693c59387b7b765fab64b543855e15a91b4 (patch) | |
| tree | dc9488b74668e7602f114e5ccf759d6d924e1d3f /lib/dump_stack.c | |
| parent | Merge tag 'printk-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
| download | kernel-faebd693c59387b7b765fab64b543855e15a91b4.tar.gz kernel-faebd693c59387b7b765fab64b543855e15a91b4.zip | |
printk: rename cpulock functions
Since the printk cpulock is CPU-reentrant and since it is used
in all contexts, its usage must be carefully considered and
most likely will require programming locklessly. To avoid
mistaking the printk cpulock as a typical lock, rename it to
cpu_sync. The main functions then become:
printk_cpu_sync_get_irqsave(flags);
printk_cpu_sync_put_irqrestore(flags);
Add extra notes of caution in the function description to help
developers understand the requirements for correct usage.
Signed-off-by: John Ogness <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/dump_stack.c')
| -rw-r--r-- | lib/dump_stack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dump_stack.c b/lib/dump_stack.c index 6b7f1bf6715d..83471e81501a 100644 --- a/lib/dump_stack.c +++ b/lib/dump_stack.c @@ -102,9 +102,9 @@ asmlinkage __visible void dump_stack_lvl(const char *log_lvl) * Permit this cpu to perform nested stack dumps while serialising * against other CPUs */ - printk_cpu_lock_irqsave(flags); + printk_cpu_sync_get_irqsave(flags); __dump_stack(log_lvl); - printk_cpu_unlock_irqrestore(flags); + printk_cpu_sync_put_irqrestore(flags); } EXPORT_SYMBOL(dump_stack_lvl); |
