From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>, Rob Herring <robh@kernel.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
"Mugunthan V N" <mugunthanvnm@ti.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Peter Hurley" <peter@hurleysoftware.com>,
"Alan Cox" <alan@linux.intel.com>, "Jiri Slaby" <jslaby@suse.com>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH] serial: core: fix console problems on uart_close
Date: Tue, 25 Oct 2016 14:55:50 +0200 [thread overview]
Message-ID: <1477400150.4332.9.camel@gmail.com> (raw)
In-Reply-To: <CAMuHMdUtp9w6RE0abNZ3q3h7viH7bkGA0iqOM7Azo3kgHq4K-w@mail.gmail.com>
On Tue, 2016-10-25 at 12:40 +0200, Geert Uytterhoeven wrote:
> Mike: I see you are using a PC, while I'm using an ARM board (with DT).
> Are you using a serial console? If yes, what's the value of port->console
> before and after the call to uart_console() that Rob's patch below removes?
Well, it's a bit larger than the average PC, it's a 64 core HP DL980,
and my console is its virtual serial port.
[ 15.217487] Serial: 8250/16550 driver, 32 ports, IRQ sharing disabled
[ 15.228212] MIKE port:ffff880276400000 port->console:0
[ 15.240889] MIKE port:ffff880276400000 port->console:0
[ 15.269606] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 15.282538] MIKE port:ffff8802764001a8 port->console:0
[ 15.293195] MIKE port:ffff8802764001a8 port->console:1
[ 15.322806] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
(30 more calls, all 0 pre 0 post)
That's with the below from Jiri Slaby applied to quell the reboot time
explosion.
---
drivers/tty/serial/serial_core.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -106,12 +106,17 @@ static inline struct uart_port *uart_por
void uart_write_wakeup(struct uart_port *port)
{
struct uart_state *state = port->state;
+ struct tty_struct *ttyp;
+
/*
* This means you called this function _after_ the port was
* closed. No cookie for you.
*/
BUG_ON(!state);
- tty_wakeup(state->port.tty);
+ ttyp = tty_port_tty_get(&state->port);
+ if (ttyp)
+ tty_wakeup(ttyp);
+ tty_kref_put(ttyp);
}
static void uart_stop(struct tty_struct *tty)
next prev parent reply other threads:[~2016-10-25 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 20:56 [PATCH] serial: core: fix console problems on uart_close Rob Herring
2016-10-25 10:40 ` Geert Uytterhoeven
2016-10-25 12:55 ` Mike Galbraith [this message]
2016-10-25 13:25 ` Rob Herring
2016-10-25 13:29 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477400150.4332.9.camel@gmail.com \
--to=umgwanakikbuti@gmail.com \
--cc=alan@linux.intel.com \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mugunthanvnm@ti.com \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=peter@hurleysoftware.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.