]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/tty/serial/sunhv.c
Merge tag 'rtc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[karo-tx-linux.git] / drivers / tty / serial / sunhv.c
index 73abd89c0108dc793159fe10d2567970de7d70ef..46e46894e918ab03c6e7821bb715332d276bf346 100644 (file)
@@ -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)
@@ -398,6 +402,12 @@ static struct uart_driver sunhv_reg = {
 
 static struct uart_port *sunhv_port;
 
+void sunhv_migrate_hvcons_irq(int cpu)
+{
+       /* Migrate hvcons irq to param cpu */
+       irq_force_affinity(sunhv_port->irq, cpumask_of(cpu));
+}
+
 /* Copy 's' into the con_write_page, decoding "\n" into
  * "\r\n" along the way.  We have to return two lengths
  * because the caller needs to know how much to advance