Messages in this thread |  | | Date | Mon, 3 Oct 2016 16:53:15 +0900 | From | Sergey Senozhatsky <> | Subject | Re: [RFC][PATCH 6/7] printk: use alternative printk buffers |
| |
On (09/30/16 13:15), Petr Mladek wrote: [..] > > and the decision was to keep `unsigned long flags' on stack in the > > alt_enter/exit caller. besides in most of the cases we already have > > it (in vprintk_emit() and console_unlock()). > > I would pass the pointer to flags as alt_enter() parameter.
I think I'll do something like this
--
void __alt_printk_enter(void); void __alt_printk_exit(void);
#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)
--
seems that this mostly will fit our needs in printk(). for anything that does not fit -- we have __alt_printk_enter()/exit().
and I'll also extend alt_printk more, some additional paths.
I'm also thinking about your rename proposal, but didn't find a perfect name yet.
-ss
|  |