ARM: etm: Add some missing locks and error checks
authorArve Hjønnevåg <arve@android.com>
Tue, 15 Feb 2011 05:09:51 +0000 (21:09 -0800)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:40:32 +0000 (13:40 -0700)
commit848bc34c4104b72a8ab8b152ceae6eaadd27113d
treeb3eb24714c266791e7e576c19c9c999f9e95bfa5
parentf717d8b087acd6802851c49f1563e9b88c1496e7
ARM: etm: Add some missing locks and error checks

It is not safe to call etm_lock or etb_lock without holding the
mutex since another thread may also have unlocked the registers.

Also add some missing checks for valid etb_regs in the etm sysfs
entries.

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