imx_rxint -> spin_lock_irqsave(&sport->port.lock, flags);
And then it will call the following functions:
uart_handle_sysrq_char -> handle_sysrq -> printk ->
__call_console_write_drivers -> imx_console_write ->
Here the imx_console_write function will call:
spin_lock_irqsave(&sport->port.lock, flags);
The A-A deadlock happens. We need spin_unlock before handle sysrq char
and spin_lock again after it.
Signed-off-by: Jason Liu <r64343@freescale.com>
continue;
}
+ spin_unlock_irqrestore(&sport->port.lock, flags);
if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx))
continue;
+ spin_lock_irqsave(&sport->port.lock, flags);
if (unlikely(rx & URXD_ERR)) {
if (rx & URXD_BRK)