Commit 374cff39 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka
Browse files

driver core: ipipe: defer dev_printk() from head domain

Just like printk(), dev_printk() cannot run from the head domain
and/or with hard IRQs disabled. In such a case, log the output
directly into the staging buffer we use for printk().

NOTE: when redirected to the buffer, the output does not include the
dev_printk() header text but is merely sent as-is to the log.
parent 799c0d98
......@@ -3347,6 +3347,17 @@ EXPORT_SYMBOL(dev_printk_emit);
static void __dev_printk(const char *level, const struct device *dev,
struct va_format *vaf)
* Console logging only if hard locked, or over the head
* stage.
if (hard_irqs_disabled() || !ipipe_root_p) {
__ipipe_log_printk(vaf->fmt, *vaf->va);
if (dev)
dev_printk_emit(level[1] - '0', dev, "%s %s: %pV",
dev_driver_string(dev), dev_name(dev), vaf);
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