Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1289036 > unrolled thread

[PATCH] serial: earlycon: Initialize uart_port spinlock

Started byBjorn Andersson <bjorn.andersson@sonymobile.com>
First post2015-12-11 02:10 +0100
Last post2015-12-11 17:30 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] serial: earlycon: Initialize uart_port spinlock Bjorn Andersson <bjorn.andersson@sonymobile.com> - 2015-12-11 02:10 +0100
    Re: [PATCH] serial: earlycon: Initialize uart_port spinlock Rob Herring <robh@kernel.org> - 2015-12-11 03:40 +0100
      Re: [PATCH] serial: earlycon: Initialize uart_port spinlock Bjorn Andersson <bjorn@kryo.se> - 2015-12-11 17:30 +0100

#1289036 — [PATCH] serial: earlycon: Initialize uart_port spinlock

FromBjorn Andersson <bjorn.andersson@sonymobile.com>
Date2015-12-11 02:10 +0100
Subject[PATCH] serial: earlycon: Initialize uart_port spinlock
Message-ID<qEknE-5Bz-11@gated-at.bofh.it>
Initialize the uart_port spinlock of earlycon to avoid the BUG() when
booting with spinlock debug enabled.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
 drivers/tty/serial/earlycon.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index f09636083426..6c18891ad8d0 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -111,6 +111,8 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
 	int err;
 	struct uart_port *port = &early_console_dev.port;
 
+	spin_lock_init(&port->lock);
+
 	/* On parsing error, pass the options buf to the setup function */
 	if (buf && !parse_options(&early_console_dev, buf))
 		buf = NULL;
@@ -202,6 +204,7 @@ int __init of_setup_earlycon(unsigned long addr,
 	int err;
 	struct uart_port *port = &early_console_dev.port;
 
+	spin_lock_init(&port->lock);
 	port->iotype = UPIO_MEM;
 	port->mapbase = addr;
 	port->uartclk = BASE_BAUD * 16;
-- 
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1289067

FromRob Herring <robh@kernel.org>
Date2015-12-11 03:40 +0100
Message-ID<qElMJ-6nW-5@gated-at.bofh.it>
In reply to#1289036
On Thu, Dec 10, 2015 at 7:08 PM, Bjorn Andersson
<bjorn.andersson@sonymobile.com> wrote:
> Initialize the uart_port spinlock of earlycon to avoid the BUG() when
> booting with spinlock debug enabled.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>

Same patch[1] should already be in Greg's queue.

Rob

[1] https://lkml.org/lkml/2015/11/27/165

> ---
>  drivers/tty/serial/earlycon.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
> index f09636083426..6c18891ad8d0 100644
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -111,6 +111,8 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
>         int err;
>         struct uart_port *port = &early_console_dev.port;
>
> +       spin_lock_init(&port->lock);
> +
>         /* On parsing error, pass the options buf to the setup function */
>         if (buf && !parse_options(&early_console_dev, buf))
>                 buf = NULL;
> @@ -202,6 +204,7 @@ int __init of_setup_earlycon(unsigned long addr,
>         int err;
>         struct uart_port *port = &early_console_dev.port;
>
> +       spin_lock_init(&port->lock);
>         port->iotype = UPIO_MEM;
>         port->mapbase = addr;
>         port->uartclk = BASE_BAUD * 16;
> --
> 2.4.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1289715

FromBjorn Andersson <bjorn@kryo.se>
Date2015-12-11 17:30 +0100
Message-ID<qEyJX-6SZ-3@gated-at.bofh.it>
In reply to#1289067
On Thu, Dec 10, 2015 at 6:35 PM, Rob Herring <robh@kernel.org> wrote:
> On Thu, Dec 10, 2015 at 7:08 PM, Bjorn Andersson
> <bjorn.andersson@sonymobile.com> wrote:
>> Initialize the uart_port spinlock of earlycon to avoid the BUG() when
>> booting with spinlock debug enabled.
>>
>> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
>
> Same patch[1] should already be in Greg's queue.
>
> Rob
>
> [1] https://lkml.org/lkml/2015/11/27/165
>

Thanks, missed that one.

Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web