linux-aspeed.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Anderson <dianders@chromium.org>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH v2 3/5] serial: qcom_geni_serial: Process sysrq at port unlock time
Date: Tue, 30 Oct 2018 15:11:05 -0700	[thread overview]
Message-ID: <20181030221107.79758-4-dianders@chromium.org> (raw)
In-Reply-To: <20181030221107.79758-1-dianders@chromium.org>

Let's take advantage of the new ("serial: core: Allow processing sysrq
at port unlock time") to handle sysrqs more cleanly.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 drivers/tty/serial/qcom_geni_serial.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index b83e3554bced..29ddc1fc65f8 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -499,9 +499,7 @@ static int handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
 					continue;
 			}
 
-			spin_unlock(&uport->lock);
-			sysrq = uart_handle_sysrq_char(uport, buf[c]);
-			spin_lock(&uport->lock);
+			sysrq = uart_prepare_sysrq_char(uport, buf[c]);
 
 			if (!sysrq)
 				tty_insert_flip_char(tport, buf[c], TTY_NORMAL);
@@ -811,7 +809,8 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev)
 		qcom_geni_serial_handle_rx(uport, drop_rx);
 
 out_unlock:
-	spin_unlock_irqrestore(&uport->lock, flags);
+	uart_unlock_and_check_sysrq(uport, flags);
+
 	return IRQ_HANDLED;
 }
 
-- 
2.19.1.568.g152ad8e336-goog


  parent reply	other threads:[~2018-10-30 22:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30 22:11 [PATCH v2 0/5] serial: Finish sysrq on qcom_geni; fix sysrq vs. lockdep on 8250 Douglas Anderson
2018-10-30 22:11 ` [PATCH v2 1/5] serial: qcom_geni_serial: Finish supporting sysrq Douglas Anderson
2018-10-30 22:11 ` [PATCH v2 2/5] serial: core: Allow processing sysrq at port unlock time Douglas Anderson
2018-10-30 22:11 ` Douglas Anderson [this message]
2018-10-30 22:11 ` [PATCH v2 4/5] serial: core: Include console.h from serial_core.h Douglas Anderson
2018-10-30 22:11 ` [PATCH v2 5/5] serial: 8250: Process sysrq at port unlock time Douglas Anderson
2018-11-07 18:23 ` [PATCH v2 0/5] serial: Finish sysrq on qcom_geni; fix sysrq vs. lockdep on 8250 Andy Shevchenko
2018-11-07 19:26   ` Doug Anderson
2018-11-07 19:54     ` Andy Shevchenko
2018-11-08  9:41     ` Petr Mladek
2018-11-09 17:07 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181030221107.79758-4-dianders@chromium.org \
    --to=dianders@chromium.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).