]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-3.18/serial-uartps-console_setup-can-t-be-placed-to-init-.patch
Linux 6.8.9
[thirdparty/kernel/stable-queue.git] / queue-3.18 / serial-uartps-console_setup-can-t-be-placed-to-init-.patch
1 From 4d7e5064d7f8e934f853c557dba14fb20ae7661a Mon Sep 17 00:00:00 2001
2 From: Michal Simek <michal.simek@xilinx.com>
3 Date: Mon, 3 Sep 2018 15:10:49 +0200
4 Subject: serial: uartps: console_setup() can't be placed to init section
5
6 [ Upstream commit 4bb1ce2350a598502b23088b169e16b43d4bc639 ]
7
8 When console device is rebinded, console_setup() is called again.
9 But marking it as __init means that function will be clear after boot is
10 complete. If console device is binded again console_setup() is not found
11 and error "Unable to handle kernel paging request at virtual address"
12 is reported.
13
14 Signed-off-by: Michal Simek <michal.simek@xilinx.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 Signed-off-by: Sasha Levin <sashal@kernel.org>
17 ---
18 drivers/tty/serial/xilinx_uartps.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
22 index df28ef14382b..892446cc28fa 100644
23 --- a/drivers/tty/serial/xilinx_uartps.c
24 +++ b/drivers/tty/serial/xilinx_uartps.c
25 @@ -1120,7 +1120,7 @@ static void cdns_uart_console_write(struct console *co, const char *s,
26 *
27 * Return: 0 on success, negative errno otherwise.
28 */
29 -static int __init cdns_uart_console_setup(struct console *co, char *options)
30 +static int cdns_uart_console_setup(struct console *co, char *options)
31 {
32 struct uart_port *port = &cdns_uart_port[co->index];
33 int baud = 9600;
34 --
35 2.19.1
36