Skip to content

Commit 7db60d0

Browse files
vijaykumar-sdavem330
authored andcommitted
sparc64: Send break twice from console to return to boot prom
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7dd4fcf commit 7db60d0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/tty/serial/sunhv.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static int receive_chars_getchar(struct uart_port *port)
116116

117117
static int receive_chars_read(struct uart_port *port)
118118
{
119-
int saw_console_brk = 0;
119+
static int saw_console_brk;
120120
int limit = 10000;
121121

122122
while (limit-- > 0) {
@@ -128,6 +128,9 @@ static int receive_chars_read(struct uart_port *port)
128128
bytes_read = 0;
129129

130130
if (stat == CON_BREAK) {
131+
if (saw_console_brk)
132+
sun_do_break();
133+
131134
if (uart_handle_break(port))
132135
continue;
133136
saw_console_brk = 1;
@@ -151,6 +154,7 @@ static int receive_chars_read(struct uart_port *port)
151154
if (port->sysrq != 0 && *con_read_page) {
152155
for (i = 0; i < bytes_read; i++)
153156
uart_handle_sysrq_char(port, con_read_page[i]);
157+
saw_console_brk = 0;
154158
}
155159

156160
if (port->state == NULL)

kernel/panic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ void panic(const char *fmt, ...)
273273
extern int stop_a_enabled;
274274
/* Make sure the user can actually press Stop-A (L1-A) */
275275
stop_a_enabled = 1;
276-
pr_emerg("Press Stop-A (L1-A) to return to the boot prom\n");
276+
pr_emerg("Press Stop-A (L1-A) from sun keyboard or send break\n"
277+
"twice on console to return to the boot prom\n");
277278
}
278279
#endif
279280
#if defined(CONFIG_S390)

0 commit comments

Comments
 (0)