--- zzzz-none-000/linux-4.1.52/drivers/tty/serial/8250/8250_core.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/drivers/tty/serial/8250/8250_core.c 2022-03-02 11:37:13.000000000 +0000 @@ -17,6 +17,9 @@ */ #if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +#if defined(CONFIG_BCM_KF_CHAR_SYSRQ) +static char sysrq_start_char='^'; +#endif #define SUPPORT_SYSRQ #endif @@ -1524,6 +1527,20 @@ else if (lsr & UART_LSR_FE) flag = TTY_FRAME; } +#if defined(CONFIG_BCM_KF_CHAR_SYSRQ) && defined(SUPPORT_SYSRQ) + /* + * Simple hack for substituting a regular ASCII char as the break + * char for the start of the Magic Sysrq sequence. This duplicates + * some of the code in uart_handle_break() in serial_core.h + */ + if (up->port.sysrq == 0) + { + if (ch == sysrq_start_char) { + up->port.sysrq = jiffies + HZ*5; + goto ignore_char; + } + } +#endif if (uart_handle_sysrq_char(port, ch)) goto ignore_char; @@ -1832,6 +1849,9 @@ struct irq_info *i; struct hlist_node *n; struct hlist_head *h; +#if defined(CONFIG_BCM_KF_KERN_WARNING) + i = NULL; +#endif mutex_lock(&hash_mutex);