Re: [PATCH printk v2 01/12] printk: rename cpulock functions

From: Petr Mladek
Date: Wed Apr 06 2022 - 09:54:48 EST


On Tue 2022-04-05 15:31:24, John Ogness wrote:
> 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 <john.ogness@xxxxxxxxxxxxx>

Looks good the me.

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr