On Sat 2016-10-08 04:40:15, Sergey Senozhatsky wrote:
> On (10/06/16 16:56), Petr Mladek wrote:
> > The question is whether we need to store the flags in
> > a per-CPU variable. We might also store it on the stack
> > of the enter()/exit() function caller. I mean something like
> 
> yes, let's keep it on the stack. this particular implementation
> was just an experiment, and I hate it. what I currently have in
> my tree:
> 
> #define alt_printk_enter(flags)                 \
>         do {                                    \
>                 local_irq_save(flags);          \
>                 __alt_printk_enter();           \
>         } while (0)
> 
> #define alt_printk_exit(flags)                  \
>         do {                                    \
>                 __alt_printk_exit();            \
>                 local_irq_restore(flags);       \
>         } while (0)

Looks fine to me.

Best Regards,
Petr

Reply via email to