]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tty: hvc_dcc: Fix duplicate character inputs
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 26 Oct 2011 02:19:43 +0000 (19:19 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:19:16 +0000 (11:19 -0800)
commita560ec6037df4b6579d0c7ca3a8f501ff5ecd25f
tree1989cf9100f9798a1d7d505b511ad64592c0abe6
parent2a44c761a0863898e5f2efbacceb65bdc504df0b
tty: hvc_dcc: Fix duplicate character inputs

commit c2a3e84f950e7ddba1f3914b005861d46ae60359 upstream.

Reading from the DCC grabs a character from the buffer and
clears the status bit. Since this is a context-changing
operation, instructions following the character read that rely on
the status bit being accurate need to be synchronized with an
ISB.

In this case, the status bit check needs to execute after the
character read otherwise we run the risk of reading the character
and checking the status bit before the read can clear the status
bit in the first place. When this happens, the user will see the
same character they typed twice, instead of once.

Add an ISB after the read and the write, so that the status check
is synchronized with the read/write operations.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/hvc/hvc_dcc.c