Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571919
| From | Vijay Kumar <vijay.ac.kumar@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 3/4] sparc64: Send break twice from console to return to boot prom |
| Date | 2017-02-01 20:40 +0100 |
| Message-ID | <t68V3-1B8-19@gated-at.bofh.it> (permalink) |
| References | <t68V3-1B8-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 039ae05..8975d9c 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 08aa88d..70f799d 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -273,7 +273,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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/4] sparc64: Jump to boot prom from console on panic Vijay Kumar <vijay.ac.kumar@oracle.com> - 2017-02-01 20:40 +0100
[PATCH v3 1/4] sparc64: Set cpu state to offline when stopped Vijay Kumar <vijay.ac.kumar@oracle.com> - 2017-02-01 20:40 +0100
[PATCH v3 2/4] sparc64: Migrate hvcons irq to panicked cpu Vijay Kumar <vijay.ac.kumar@oracle.com> - 2017-02-01 20:40 +0100
[PATCH v3 3/4] sparc64: Send break twice from console to return to boot prom Vijay Kumar <vijay.ac.kumar@oracle.com> - 2017-02-01 20:40 +0100
Re: [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic David Miller <davem@davemloft.net> - 2017-02-01 21:00 +0100
Re: [PATCH v3 0/4] sparc64: Jump to boot prom from console on panic Vijay Kumar <vijay.ac.kumar@oracle.com> - 2017-02-01 22:30 +0100
csiph-web