Skip to content

Commit

Permalink
sparc64: Send break twice from console to return to boot prom
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
vijaykumar-s authored and davem330 committed Feb 23, 2017
1 parent 7dd4fcf commit 7db60d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion drivers/tty/serial/sunhv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion kernel/panic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7db60d0

Please sign in to comment.