* [PATCH] serial: earlycon: Initialize uart_port spinlock
@ 2015-12-11 1:08 Bjorn Andersson
2015-12-11 2:35 ` Rob Herring
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Andersson @ 2015-12-11 1:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Rob Herring; +Cc: linux-serial, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: earlycon: Initialize uart_port spinlock
2015-12-11 1:08 [PATCH] serial: earlycon: Initialize uart_port spinlock Bjorn Andersson
@ 2015-12-11 2:35 ` Rob Herring
2015-12-11 16:28 ` Bjorn Andersson
0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2015-12-11 2:35 UTC (permalink / raw)
To: Bjorn Andersson, Greg Kroah-Hartman
Cc: Jiri Slaby, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: earlycon: Initialize uart_port spinlock
2015-12-11 2:35 ` Rob Herring
@ 2015-12-11 16:28 ` Bjorn Andersson
0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2015-12-11 16:28 UTC (permalink / raw)
To: Rob Herring
Cc: Bjorn Andersson, Greg Kroah-Hartman, Jiri Slaby,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-11 16:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 1:08 [PATCH] serial: earlycon: Initialize uart_port spinlock Bjorn Andersson
2015-12-11 2:35 ` Rob Herring
2015-12-11 16:28 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).