diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-07 09:42:35 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-03-07 09:42:35 -0500 |
commit | 3ba4cea21901d90d703b52e4a806fbafa86037a6 (patch) | |
tree | b556d880492a783861a39c8197e35d56ac4c77f9 /drivers/tty/n_tty.c | |
parent | a2e6177c931793b4ffb30e722fce6fc7aaff9fa5 (diff) | |
parent | 8e781f65423c2e8e65a56972ba996b6c01a5ef3e (diff) |
Merge branch 'for-rmk/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable
* Support for Qualcomm Krait processors (run perf on your phone!)
* Support for Cortex-A12 (run perf stat on your FPGA!)
* Support for perf_sample_event_took, allowing us to automatically decrease
the sample rate if we can't handle the PMU interrupts quickly enough
(run perf record on your FPGA!).
As part of the Krait support, we also gain support for PPI generation by
the PMU.
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index cb8017aa4434..d15624c1b751 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -817,8 +817,7 @@ static void process_echoes(struct tty_struct *tty) | |||
817 | struct n_tty_data *ldata = tty->disc_data; | 817 | struct n_tty_data *ldata = tty->disc_data; |
818 | size_t echoed; | 818 | size_t echoed; |
819 | 819 | ||
820 | if ((!L_ECHO(tty) && !L_ECHONL(tty)) || | 820 | if (ldata->echo_mark == ldata->echo_tail) |
821 | ldata->echo_mark == ldata->echo_tail) | ||
822 | return; | 821 | return; |
823 | 822 | ||
824 | mutex_lock(&ldata->output_lock); | 823 | mutex_lock(&ldata->output_lock); |
@@ -1244,7 +1243,8 @@ n_tty_receive_signal_char(struct tty_struct *tty, int signal, unsigned char c) | |||
1244 | if (L_ECHO(tty)) { | 1243 | if (L_ECHO(tty)) { |
1245 | echo_char(c, tty); | 1244 | echo_char(c, tty); |
1246 | commit_echoes(tty); | 1245 | commit_echoes(tty); |
1247 | } | 1246 | } else |
1247 | process_echoes(tty); | ||
1248 | isig(signal, tty); | 1248 | isig(signal, tty); |
1249 | return; | 1249 | return; |
1250 | } | 1250 | } |
@@ -1274,7 +1274,7 @@ n_tty_receive_char_special(struct tty_struct *tty, unsigned char c) | |||
1274 | if (I_IXON(tty)) { | 1274 | if (I_IXON(tty)) { |
1275 | if (c == START_CHAR(tty)) { | 1275 | if (c == START_CHAR(tty)) { |
1276 | start_tty(tty); | 1276 | start_tty(tty); |
1277 | commit_echoes(tty); | 1277 | process_echoes(tty); |
1278 | return 0; | 1278 | return 0; |
1279 | } | 1279 | } |
1280 | if (c == STOP_CHAR(tty)) { | 1280 | if (c == STOP_CHAR(tty)) { |
@@ -1820,8 +1820,10 @@ static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
1820 | * Fix tty hang when I_IXON(tty) is cleared, but the tty | 1820 | * Fix tty hang when I_IXON(tty) is cleared, but the tty |
1821 | * been stopped by STOP_CHAR(tty) before it. | 1821 | * been stopped by STOP_CHAR(tty) before it. |
1822 | */ | 1822 | */ |
1823 | if (!I_IXON(tty) && old && (old->c_iflag & IXON) && !tty->flow_stopped) | 1823 | if (!I_IXON(tty) && old && (old->c_iflag & IXON) && !tty->flow_stopped) { |
1824 | start_tty(tty); | 1824 | start_tty(tty); |
1825 | process_echoes(tty); | ||
1826 | } | ||
1825 | 1827 | ||
1826 | /* The termios change make the tty ready for I/O */ | 1828 | /* The termios change make the tty ready for I/O */ |
1827 | if (waitqueue_active(&tty->write_wait)) | 1829 | if (waitqueue_active(&tty->write_wait)) |
@@ -1896,7 +1898,7 @@ err: | |||
1896 | static inline int input_available_p(struct tty_struct *tty, int poll) | 1898 | static inline int input_available_p(struct tty_struct *tty, int poll) |
1897 | { | 1899 | { |
1898 | struct n_tty_data *ldata = tty->disc_data; | 1900 | struct n_tty_data *ldata = tty->disc_data; |
1899 | int amt = poll && !TIME_CHAR(tty) ? MIN_CHAR(tty) : 1; | 1901 | int amt = poll && !TIME_CHAR(tty) && MIN_CHAR(tty) ? MIN_CHAR(tty) : 1; |
1900 | 1902 | ||
1901 | if (ldata->icanon && !L_EXTPROC(tty)) { | 1903 | if (ldata->icanon && !L_EXTPROC(tty)) { |
1902 | if (ldata->canon_head != ldata->read_tail) | 1904 | if (ldata->canon_head != ldata->read_tail) |