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)
committerColin Cross <ccross@android.com>
Tue, 14 Jun 2011 16:09:59 +0000 (09:09 -0700)
commita3216015343a90f5516eebb6d18ee3f5e30c9174
treeecfd97d09f431eeb15d5f6561820629fb091f4e6
parent81e4312eeb4ed3973454ea73c5345ef927e32453
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