Skip to content
Commit 874d6b2d authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Bruce Ashfield
Browse files

printk: Skip console drivers on PREEMPT_RT.



printk might be invoked in a context with disabled interrupts and or
preemption and additionally disables interrupts before it invokes the
console drivers. This behaviour is not desired on PREEMPT_RT:
- The console driver are using spinlock_t based locking which become sleeping
  locks on PREEMPT_RT and must not be acquired with disabled interrupts (or
  preemption).

- The locks within the console drivers must remain sleeping locks and they must
  not disable interrupts. Printing (and polling for its completion) at 115200
  baud on an UART takes too long for PREEMPT_RT in general and so raises the
  latency of the IRQ-off time of the system beyond acceptable levels.

Skip printing to the console as temporary workaround until the printing threads
and atomic consoles have been introduced or another solution which is
compatible with the PREEMPT_RT approach.
With this change, the user will not see any kernel message printed to the
console but can retrieve the printk buffer from userland (via the dmesg
command). This allows enable PREEMPT_RT as a whole without disabling printk and
loosing all kernel output.

Disable console printing on PREEMPT_RT.

Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lkml.kernel.org/r/Yt6zwP9xSdUhsoQ9@linutronix.de
parent 34fe6c78
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