ARM: 6656/1: hw_breakpoint: avoid UNPREDICTABLE behaviour when reading DBGDSCR
authorWill Deacon <will.deacon@arm.com>
Fri, 11 Feb 2011 14:55:12 +0000 (15:55 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 11 Feb 2011 22:54:47 +0000 (22:54 +0000)
commited19b739c5c76ad241d30f6c6a5ee96fb284f4cf
tree5e36a488dbf997875b732faff8fabfdbe1fac070
parent34cd2d38db423a991a36d14e9f79e98993addd07
ARM: 6656/1: hw_breakpoint: avoid UNPREDICTABLE behaviour when reading DBGDSCR

Reading baseline CP14 registers, other than DBGDIDR, when the OS Lock
is set leads to UNPREDICTABLE behaviour.

This patch ensures that we clear the OS lock before accessing anything
other than the DBGDIDR, thereby avoiding this behaviour.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/hw_breakpoint.c