]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: etm: Don't try to clear the buffer full status after reading the buffer
authorArve Hjønnevåg <arve@android.com>
Tue, 1 Feb 2011 05:34:47 +0000 (21:34 -0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:13:02 +0000 (14:13 +0200)
commitba648e92d522358ca72ec80a19f0df49c6607f8d
tree7a4090dbc3facc66b79696afd766745e424530a2
parent68754b6934ddacf289209f47ad9dcebc8cf32ca0
ARM: etm: Don't try to clear the buffer full status after reading the buffer

If the write address was at the end of the buffer, toggling the trace
capture bit would set the RAM-full status instead of clearing it, and
if any of the stop bits in the formatter is set toggling the trace
capture bit may not do anything.

Instead use the read position to find out if the data has already
been returned.

This also fixes the read function so it works when the trace buffer is
larger than the buffer passed in from user space. The old version
would reset the trace buffer pointers after every read, so the second
call to read would always return 0.

Change-Id: I75256abe2556adfd66fd5963e46f9e84ae4645e1
Signed-off-by: Arve Hjønnevåg <arve@android.com>
arch/arm/kernel/etm.c