1
0
Fork 0
alistair23-linux/drivers/tty
Peter Hurley da261e7fe7 tty: Simplify tty buffer/ldisc interface with helper function
Ldisc interface functions must be called with interrupts enabled.
Separating the ldisc calls into a helper function simplies the
eventual removal of the spinlock.

Note that access to the buf->head ptr outside the spinlock is
safe here because;
* __tty_buffer_flush() is prevented from running while buffer work
  performs i/o,
* tty_buffer_find() only assigns buf->head if the flip buffer list
  is empty (which is never the case in flush_to_ldisc() since at
  least one buffer is always left in the list after use)
Access to the read index outside the spinlock is safe here for the
same reasons.

Update the buffer's read index _after_ the data has been received
by the ldisc.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 16:42:59 -07:00
..
hvc tty: replace strict_strtoul() with kstrtoul() 2013-06-03 10:30:42 -07:00
ipwireless tty: ipwireless: Remove redundant NULL check before kfree 2013-03-15 13:58:32 -07:00
serial Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-07-13 14:52:21 -07:00
vt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-03 09:10:19 -07:00
Kconfig tty: metag_da: Add metag DA TTY driver 2013-02-06 11:10:17 -08:00
Makefile tty: Add timed, writer-prioritized rw semaphore 2013-05-20 12:30:32 -07:00
amiserial.c TTY: amiserial, use module_platform_driver_probe() 2013-03-15 13:55:23 -07:00
bfin_jtag_comm.c TTY: switch tty_flip_buffer_push 2013-01-15 22:30:15 -08:00
cyclades.c TTY: add tty_port_tty_hangup helper 2013-03-18 16:24:29 -07:00
ehv_bytechan.c TTY: ehv_bytechan: add missing platform_driver_unregister() when module exit 2013-05-20 12:15:59 -07:00
goldfish.c goldfish: move to tty_port for flip buffers 2013-01-25 08:09:38 -08:00
isicom.c TTY: switch tty_flip_buffer_push 2013-01-15 22:30:15 -08:00
metag_da.c tty: metag_da: avoid getting tty kref in dashtty_timer() 2013-02-06 11:10:17 -08:00
moxa.c TTY: add tty_port_tty_hangup helper 2013-03-18 16:24:29 -07:00
moxa.h
mxser.c tty: mxser: Fix build warning introduced by dfc7b837c7 (Re: linux-next: build warning after merge of the tty.current tree) 2013-05-22 10:26:02 -07:00
mxser.h
n_gsm.c TTY: fix DTR not being dropped on hang up 2013-03-18 16:27:53 -07:00
n_hdlc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
n_r3964.c tty: localise the lock 2012-08-10 12:55:47 -07:00
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: Buffer work should not reschedule itself 2013-06-17 12:55:30 -07:00
nozomi.c TTY: add tty_port_tty_hangup helper 2013-03-18 16:24:29 -07:00
pty.c tty: Fix transient pty write() EIO 2013-06-17 12:37:29 -07:00
rocket.c TTY: rocket, fix more no-PCI warnings 2013-05-20 12:15:59 -07:00
rocket.h
rocket_int.h
synclink.c TTY: synclink: fix DTR being raised on hang up 2013-04-12 14:08:17 -07:00
synclink_gt.c TTY: synclink_gt: fix DTR being raised on hang up 2013-04-12 14:08:17 -07:00
synclinkmp.c TTY: synclinkmp: fix DTR being raised on hang up 2013-04-12 14:08:18 -07:00
sysrq.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-07-04 15:35:08 -07:00
tty_audit.c audit: do not needlessly take a lock in tty_audit_exit 2013-04-30 15:31:28 -04:00
tty_buffer.c tty: Simplify tty buffer/ldisc interface with helper function 2013-07-23 16:42:59 -07:00
tty_io.c tty: Replace ldisc locking with ldisc_sem 2013-07-23 16:38:34 -07:00
tty_ioctl.c tty: Fix unsafe bit ops in tty_throttle_safe/unthrottle_safe 2013-04-15 11:08:12 -07:00
tty_ldisc.c tty: Don't change receive_room for ioctl(TIOCSETD) 2013-07-23 16:42:59 -07:00
tty_ldsem.c tty: Add timed, writer-prioritized rw semaphore 2013-05-20 12:30:32 -07:00
tty_mutex.c tty: tty_mutex.c: Fixed coding style warning (using printk) 2012-10-24 11:34:51 -07:00
tty_port.c tty: Complete ownership transfer of flip buffers 2013-03-18 16:44:02 -07:00