From 61e281a286201731b4ecfd96bd3f5968622d8760 Mon Sep 17 00:00:00 2001 From: Venkata Manasa Kakarla Date: Fri, 18 Sep 2020 16:32:36 +0530 Subject: [PATCH] serial: msm_geni_serial: Don't use WARN_ON for console uart In handler_isr for console uart cases using warn_on for debugging issues will further lead into the spinlock recursion where the interrupt routine holds the spinlock and will try to print log which again needs to acquire the spinlock. To resolve this recursion issue replaced the warn_on with IPC logs for console uart. Change-Id: I6a0a10ff8c14a8ad6c74652f6d4e6e66ffcee13b Signed-off-by: Venkata Manasa Kakarla --- drivers/tty/serial/msm_geni_serial.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/msm_geni_serial.c b/drivers/tty/serial/msm_geni_serial.c index 0062d210e76a..a3aa404d9628 100644 --- a/drivers/tty/serial/msm_geni_serial.c +++ b/drivers/tty/serial/msm_geni_serial.c @@ -1944,7 +1944,12 @@ static void msm_geni_serial_handle_isr(struct uart_port *uport, geni_write_reg_nolog(s_irq_status, uport->membase, SE_GENI_S_IRQ_CLEAR); if ((m_irq_status & M_ILLEGAL_CMD_EN)) { - WARN_ON(1); + if (uart_console(uport)) + IPC_LOG_MSG(msm_port->console_log, + "%s.Illegal interrupt. sirq 0x%x mirq:0x%x\n", + __func__, s_irq_status, m_irq_status); + else + WARN_ON(1); goto exit_geni_serial_isr; }