]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: Send break twice from console to return to boot prom
authorVijay Kumar <vijay.ac.kumar@oracle.com>
Wed, 1 Feb 2017 19:34:39 +0000 (11:34 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 15 Jun 2017 03:44:00 +0000 (20:44 -0700)
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>
(cherry picked from commit 7db60d05e5ccc0a473fa2275f90f2fca0002ab21)

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Orabug: 24297427

drivers/tty/serial/sunhv.c
kernel/panic.c

index 6e84e857a0b7df8f7427b928b462e6bf2a95e6cf..8e737446f3e0f3da09ac6109ec3e7bd2ee5a35f7 100644 (file)
@@ -123,7 +123,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) {
@@ -135,6 +135,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;
@@ -158,6 +161,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)
index 1f34bad2e35433fc443d4105c6eda3d66d1391da..21cf87a71e181b42f6e881174168a5a436b6e986 100644 (file)
@@ -229,7 +229,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)