From: Alan Cox <alan@linux.intel.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, jirislaby@gmail.com
Subject: Re: [PATCH 01/10] TTY: serial, cleanup include file
Date: Wed, 9 Nov 2011 21:59:01 +0000 [thread overview]
Message-ID: <20111109215901.16f44570@bob.linux.org.uk> (raw)
In-Reply-To: <1320870831-23778-1-git-send-email-jslaby@suse.cz>
> ...instead of taking and dropping a reference in both uart_insert_char
> and uart_push_chars there. But it may be as well an overkill, as this
> stuff is not time critical. So any opinions? (If not I will proceed
> without ticketing having tty_port_tty_get/put in every call. Like I
> have it now.)
The cure for this is different (and a spot more invasive)
We need to move the tty_buffer objects into the tty_port. At that point
the lifetime becomes
create device (and tty_port struct)
request_irq
lifetime of physical port (ttys come and go)
free_irq
free tty_port
done
and the locking goes away. On the flush_to_ldisc side we know the port
physically exists because the work queue for the ldisc is killed and we
wait for it when we kill off the port (we may need a spot more checking
there)
This needs every tty of all kinds to have a tty_port even if isn't used
for anything else. That also cleans a ton of stuff up because then we
can always put the tty_port in tty->private_data which means we can
clean up some of the glue further.
Alan
next prev parent reply other threads:[~2011-11-09 21:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 20:33 [PATCH 01/10] TTY: serial, cleanup include file Jiri Slaby
2011-11-09 20:33 ` [PATCH 02/10] TTY: serial, cleanup atmel_set_ldisc Jiri Slaby
2011-11-15 9:01 ` Nicolas Ferre
2011-11-09 20:33 ` [PATCH 03/10] TTY: serial, switch closing_wait and close_delay to jiffies Jiri Slaby
2011-11-09 20:33 ` [PATCH 04/10] TTY: serial, use tty_port_close_start helper Jiri Slaby
2011-11-09 20:33 ` [PATCH 05/10] TTY: serial, document few functions Jiri Slaby
2011-11-09 20:33 ` [PATCH 06/10] TTY: serial, do not touch tty->alt_speed Jiri Slaby
2011-11-09 20:33 ` [PATCH 07/10] TTY: serial, inline uart_get Jiri Slaby
2011-11-09 20:33 ` [PATCH 08/10] TTY: serial, define uart_port_activate/shutdown Jiri Slaby
2011-11-09 20:33 ` [PATCH 09/10] TTY: serial, fill uart_port_shutdown Jiri Slaby
2011-11-09 20:34 ` [PATCH 10/10] TTY: serial, extract uart_port_startup Jiri Slaby
2011-11-09 21:59 ` Alan Cox [this message]
2011-11-09 22:09 ` [PATCH 01/10] TTY: serial, cleanup include file Jiri Slaby
2011-11-09 23:25 ` Alan Cox
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=20111109215901.16f44570@bob.linux.org.uk \
--to=alan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=jirislaby@gmail.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.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 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).