mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vijay Kumar <vijay.ac.kumar@oracle.com>
To: davem@davemloft.net, sparclinux@vger.kernel.org
Cc: karl.volz@oracle.com, rob.gardner@oracle.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] sparc64: Send break twice from console to return to boot prom
Date: Thu, 10 Nov 2016 14:43:35 -0800	[thread overview]
Message-ID: <1478817816-98939-3-git-send-email-vijay.ac.kumar@oracle.com> (raw)
In-Reply-To: <1478817816-98939-1-git-send-email-vijay.ac.kumar@oracle.com>

Now we can also jump to boot prom from sunhv console by sending
break twice on console for both running and panicked kernel
cases.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
---
 drivers/tty/serial/sunhv.c |    6 +++++-
 kernel/panic.c             |    3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index 59828d8..33c35b4 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -116,7 +116,7 @@ static int receive_chars_getchar(struct uart_port *port)
 
 static int receive_chars_read(struct uart_port *port)
 {
-	int saw_console_brk = 0;
+	static int saw_console_brk;
 	int limit = 10000;
 
 	while (limit-- > 0) {
@@ -128,6 +128,9 @@ static int receive_chars_read(struct uart_port *port)
 			bytes_read = 0;
 
 			if (stat == CON_BREAK) {
+				if (saw_console_brk)
+					sun_do_break();
+
 				if (uart_handle_break(port))
 					continue;
 				saw_console_brk = 1;
@@ -151,6 +154,7 @@ static int receive_chars_read(struct uart_port *port)
 		if (port->sysrq != 0 &&  *con_read_page) {
 			for (i = 0; i < bytes_read; i++)
 				uart_handle_sysrq_char(port, con_read_page[i]);
+			saw_console_brk = 0;
 		}
 
 		if (port->state == NULL)
diff --git a/kernel/panic.c b/kernel/panic.c
index ca8cea1..4fe3b28 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -240,7 +240,8 @@ void panic(const char *fmt, ...)
 		extern int stop_a_enabled;
 		/* Make sure the user can actually press Stop-A (L1-A) */
 		stop_a_enabled = 1;
-		pr_emerg("Press Stop-A (L1-A) to return to the boot prom\n");
+		pr_emerg("Press Stop-A (L1-A) from sun keyboard or send break\n"
+			 "twice on console to return to the boot prom\n");
 	}
 #endif
 #if defined(CONFIG_S390)
-- 
1.7.1

  parent reply	other threads:[~2016-11-10 22:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10 22:43 [PATCH 1/4] sparc64: Set cpu state to offline when stopped Vijay Kumar
2016-11-10 22:43 ` [PATCH 2/4] sparc64: Migrate hvcons irq to panicked cpu Vijay Kumar
2016-11-10 22:43 ` Vijay Kumar [this message]
2016-11-10 22:43 ` [PATCH 4/4] Documentation/sparc: Steps for sending break on sunhv console Vijay Kumar
2016-11-10 23:27 ` [PATCH 1/4] sparc64: Set cpu state to offline when stopped David Miller

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=1478817816-98939-3-git-send-email-vijay.ac.kumar@oracle.com \
    --to=vijay.ac.kumar@oracle.com \
    --cc=davem@davemloft.net \
    --cc=karl.volz@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.gardner@oracle.com \
    --cc=sparclinux@vger.kernel.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

all inboxes | Powered by JetHome®