ARM: etm: Return the entire trace buffer if it is empty after reset
authorArve Hjønnevåg <arve@android.com>
Sat, 5 Feb 2011 06:38:14 +0000 (22:38 -0800)
committerColin Cross <ccross@android.com>
Tue, 14 Jun 2011 16:10:00 +0000 (09:10 -0700)
commit97aba2e59990d8d53343c36f79b5895039cf0e1b
treeb01f6e986a275faa9c799fed29ac2f497473ae31
parenta3216015343a90f5516eebb6d18ee3f5e30c9174
ARM: etm: Return the entire trace buffer if it is empty after reset

On some SOCs the read and write pointer are reset when the chip
resets, but the trace buffer content is preserved. If the status
bits indicates that the buffer is empty and we have never started
tracing, assume the buffer is full instead. This can be useful
if the system rebooted from a watchdog reset.

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