octeontx2-pcicons: remove dev_err() from TTY write
commit f2ab142124f47e49f0af5c59a424f9aad87ed5e7 from git@git.assembla.com:cavium/WindRiver.linux.git Under the hood dev_err() calls printk(). When the time comes to flush the buffer to the hardware, printk() iterates through system consoles and calls their .write() handlers. Thus, calling dev_err() in the TTY write handler results in calling the same handler again from itself. That, in turn, leads to a deadlock. Using trace_printk() instead allows to observe debug messages without automatically writing them to console. If kernel is compiled without tracing options, trace_printk() calls are not effective. After kernel is built with the following options: CONFIG_FUNCTION_TRACER CONFIG_FUNCTION_GRAPH_TRACER CONFIG_STACK_TRACER CONFIG_DYNAMIC_FTRACE Debug messages can be observed as follows (output truncated for readability): ~# mount -t debugfs none /sys/kernel/debug/ ~# cd /sys/kernel/debug/tracing/ tracing# echo nop > current_tracer tracing# cat trace | head -15 # tracer: nop # # entries-in-buffer/entries-written: 308/308 #P:1 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | dmesg-163 [000] d..1 121.11864: otx_console_write: Timeout awaiting host Change-Id: Ia8daf4a695171583bc5c899fd9f99372d3819fed Signed-off-by:Wojciech Zmuda <wzmuda@marvell.com> Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/86224 Tested-by:
sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by:
Chandrakala Chavva <cchavva@marvell.com> Signed-off-by:
Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
Loading
Please register or sign in to comment