Linux-Serial Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1 1/5] Revert "serial: sunhv: Initialize lock for non-registered console"
@ 2020-07-11 13:53 Andy Shevchenko
  2020-07-11 13:53 ` [PATCH v1 2/5] Revert "serial: amba-pl011: Make sure we initialize the port.lock spinlock" Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andy Shevchenko @ 2020-07-11 13:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: Andy Shevchenko

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()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/sunhv.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index e35073e93a5b..eafada8fb6fa 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -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;
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 2/5] Revert "serial: amba-pl011: Make sure we initialize the port.lock spinlock"
  2020-07-11 13:53 [PATCH v1 1/5] Revert "serial: sunhv: Initialize lock for non-registered console" Andy Shevchenko
@ 2020-07-11 13:53 ` Andy Shevchenko
  2020-07-11 13:53 ` [PATCH v1 3/5] Revert "tty: serial: add missing spin_lock_init for SiFive serial console" Andy Shevchenko
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2020-07-11 13:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: Andy Shevchenko

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()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/amba-pl011.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 8efd7c2a34fe..c010f639298d 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -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;
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 3/5] Revert "tty: serial: add missing spin_lock_init for SiFive serial console"
  2020-07-11 13:53 [PATCH v1 1/5] Revert "serial: sunhv: Initialize lock for non-registered console" Andy Shevchenko
  2020-07-11 13:53 ` [PATCH v1 2/5] Revert "serial: amba-pl011: Make sure we initialize the port.lock spinlock" Andy Shevchenko
@ 2020-07-11 13:53 ` Andy Shevchenko
  2020-07-11 13:53 ` [PATCH v1 4/5] Revert "serial: imx: Initialize lock for non-registered console" Andy Shevchenko
  2020-07-11 13:53 ` [PATCH v1 5/5] Revert "serial: sh-sci: Initialize spinlock for uart console" Andy Shevchenko
  3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2020-07-11 13:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: 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()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/sifive.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
index 0b5110dad051..13eadcb8aec4 100644
--- a/drivers/tty/serial/sifive.c
+++ b/drivers/tty/serial/sifive.c
@@ -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;
 }
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 4/5] Revert "serial: imx: Initialize lock for non-registered console"
  2020-07-11 13:53 [PATCH v1 1/5] Revert "serial: sunhv: Initialize lock for non-registered console" Andy Shevchenko
  2020-07-11 13:53 ` [PATCH v1 2/5] Revert "serial: amba-pl011: Make sure we initialize the port.lock spinlock" Andy Shevchenko
  2020-07-11 13:53 ` [PATCH v1 3/5] Revert "tty: serial: add missing spin_lock_init for SiFive serial console" Andy Shevchenko
@ 2020-07-11 13:53 ` Andy Shevchenko
  2020-07-11 13:53 ` [PATCH v1 5/5] Revert "serial: sh-sci: Initialize spinlock for uart console" Andy Shevchenko
  3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2020-07-11 13:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: 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()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/imx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1265e8d86d8a..6175f8398130 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -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);
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 5/5] Revert "serial: sh-sci: Initialize spinlock for uart console"
  2020-07-11 13:53 [PATCH v1 1/5] Revert "serial: sunhv: Initialize lock for non-registered console" Andy Shevchenko
                   ` (2 preceding siblings ...)
  2020-07-11 13:53 ` [PATCH v1 4/5] Revert "serial: imx: Initialize lock for non-registered console" Andy Shevchenko
@ 2020-07-11 13:53 ` Andy Shevchenko
  3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2020-07-11 13:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-serial; +Cc: 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()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/sh-sci.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 83b81b6c3dbf..fc3515b92554 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -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);
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-11 13:53 [PATCH v1 1/5] Revert "serial: sunhv: Initialize lock for non-registered console" Andy Shevchenko
2020-07-11 13:53 ` [PATCH v1 2/5] Revert "serial: amba-pl011: Make sure we initialize the port.lock spinlock" Andy Shevchenko
2020-07-11 13:53 ` [PATCH v1 3/5] Revert "tty: serial: add missing spin_lock_init for SiFive serial console" Andy Shevchenko
2020-07-11 13:53 ` [PATCH v1 4/5] Revert "serial: imx: Initialize lock for non-registered console" Andy Shevchenko
2020-07-11 13:53 ` [PATCH v1 5/5] Revert "serial: sh-sci: Initialize spinlock for uart console" Andy Shevchenko

Linux-Serial Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-serial/0 linux-serial/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-serial linux-serial/ https://lore.kernel.org/linux-serial \
		linux-serial@vger.kernel.org
	public-inbox-index linux-serial

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-serial


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git