Commit 662a6f2f authored by Philippe Gerum's avatar Philippe Gerum

ipipe: printk: shorten deferred output handling

parent 5297d98c
...@@ -1816,6 +1816,15 @@ int __ipipe_log_printk(const char *fmt, va_list args) ...@@ -1816,6 +1816,15 @@ int __ipipe_log_printk(const char *fmt, va_list args)
return ret; return ret;
} }
static void do_deferred_vprintk(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vprintk_func(fmt, args);
va_end(args);
}
void __ipipe_flush_printk (unsigned virq, void *cookie) void __ipipe_flush_printk (unsigned virq, void *cookie)
{ {
char *p = __ipipe_printk_buf; char *p = __ipipe_printk_buf;
...@@ -1829,13 +1838,12 @@ void __ipipe_flush_printk (unsigned virq, void *cookie) ...@@ -1829,13 +1838,12 @@ void __ipipe_flush_printk (unsigned virq, void *cookie)
lmax = __ipipe_printk_fill; lmax = __ipipe_printk_fill;
while (out < lmax) { while (out < lmax) {
len = strlen(p) + 1; len = strlen(p) + 1;
printk("%s",p); do_deferred_vprintk("%s", p);
p += len; p += len;
out += len; out += len;
} }
raw_spin_lock_irqsave(&__ipipe_printk_lock, flags); raw_spin_lock_irqsave(&__ipipe_printk_lock, flags);
} } while (__ipipe_printk_fill != lmax);
while (__ipipe_printk_fill != lmax);
__ipipe_printk_fill = 0; __ipipe_printk_fill = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment