]> 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)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:27 +0000 (08:35 +0200)
commit6f001578def5e0e16e41db3a2d2eb745e1d4e5fe
tree7a4090dbc3facc66b79696afd766745e424530a2
parent34de15a934a5751e7cdf9ebe5df8174d658e3268
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