Skip to contentSkip to conversation

Revert "serial: sunhv: Initialize lock for non-registered console"

PATCH New Andy Shevchenko 1 participant 5 messages Jul 11, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 Revert "serial: sunhv: Initialize lock for non-registered console"

This reverts commit 0f87aa66e8c314f95c00eeff978c8a0b41e05d50.

There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted.

Fixes 0f87aa66e8c3 ("serial: sunhv: Initialize lock for non-registered console")

Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()")

---
 drivers/tty/serial/sunhv.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/tty/serial/sunhv.c +0 -3
index e35073e93a5b..eafada8fb6fa 100644
@@ -567,9 +567,6 @@ static int hv_probe(struct platform_device *op)
 	sunserial_console_match(&sunhv_console, op->dev.of_node,
 				&sunhv_reg, port->line, false);
 
-	/* We need to initialize lock even for non-registered console */
-	spin_lock_init(&port->lock);
-
 	err = uart_add_one_port(&sunhv_reg, port);
 	if (err)
 		goto out_unregister_driver;
Signature · 1 line
2.27.0
#1 lore raw

PATCH 2/5 Revert "serial: amba-pl011: Make sure we initialize the port.lock spinlock"

This reverts commit 8508f4cba308f785b2fd4b8c38849c117b407297.

There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted.

Fixes 8508f4cba308 ("serial: amba-pl011: Make sure we initialize the port.lock spinlock")

Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()")

---
 drivers/tty/serial/amba-pl011.c | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/serial/amba-pl011.c +0 -1
index 8efd7c2a34fe..c010f639298d 100644
@@ -2607,7 +2607,6 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap,
 	uap->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_AMBA_PL011_CONSOLE);
 	uap->port.flags = UPF_BOOT_AUTOCONF;
 	uap->port.line = index;
-	spin_lock_init(&uap->port.lock);
 
 	amba_ports[index] = uap;
 
Signature · 1 line
2.27.0
#2 lore raw

PATCH 3/5 Revert "tty: serial: add missing spin_lock_init for SiFive serial console"

In reply to Andy Shevchenko

This reverts commit 17b4efdf4e4867079012a48ca10d965fe9d68822.

There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted.

Fixes 17b4efdf4e48 ("tty: serial: add missing spin_lock_init for SiFive serial console")

Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()")

---
 drivers/tty/serial/sifive.c | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/serial/sifive.c +0 -1
index 0b5110dad051..13eadcb8aec4 100644
@@ -883,7 +883,6 @@ console_initcall(sifive_console_init);
 
 static void __ssp_add_console_port(struct sifive_serial_port *ssp)
 {
-	spin_lock_init(&ssp->port.lock);
 	sifive_serial_console_ports[ssp->port.line] = ssp;
 }
 
Signature · 1 line
2.27.0
#3 lore raw

PATCH 4/5 Revert "serial: imx: Initialize lock for non-registered console"

In reply to Andy Shevchenko

This reverts commit 8f065acec7573672dd15916e31d1e9b2e785566c.

There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted.

Fixes 8f065acec757 ("serial: imx: Initialize lock for non-registered console")

Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()")

---
 drivers/tty/serial/imx.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/tty/serial/imx.c +0 -3
index 1265e8d86d8a..6175f8398130 100644
@@ -2406,9 +2406,6 @@ static int imx_uart_probe(struct platform_device *pdev)
 		}
 	}
 
-	/* We need to initialize lock even for non-registered console */
-	spin_lock_init(&sport->port.lock);
-
 	imx_uart_ports[sport->port.line] = sport;
 
 	platform_set_drvdata(pdev, sport);
Signature · 1 line
2.27.0
#4 lore raw

PATCH 5/5 Revert "serial: sh-sci: Initialize spinlock for uart console"

In reply to Andy Shevchenko

This reverts commit f38278e9b810b06aff2981d505267be984423ba3.

There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted.

Fixes f38278e9b810 ("serial: sh-sci: Initialize spinlock for uart console")

Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()")

---
 drivers/tty/serial/sh-sci.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/tty/serial/sh-sci.c +0 -3
index 83b81b6c3dbf..fc3515b92554 100644
@@ -3282,9 +3282,6 @@ static int sci_probe_single(struct platform_device *dev,
 		sciport->port.flags |= UPF_HARD_FLOW;
 	}
 
-	if (sci_uart_driver.cons->index == sciport->port.line)
-		spin_lock_init(&sciport->port.lock);
-
 	ret = uart_add_one_port(&sci_uart_driver, &sciport->port);
 	if (ret) {
 		sci_cleanup_single(sciport);
Signature · 1 line
2.27.0