ARM: 6657/1: hw_breakpoint: fix ptrace breakpoint advertising on unsupported arch
authorWill Deacon <will.deacon@arm.com>
Fri, 11 Feb 2011 15:01:42 +0000 (16:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 11 Feb 2011 22:54:48 +0000 (22:54 +0000)
commit66e1cfe6d52c69d317e9df76ebc8538a34af0d51
tree18ff75aa8b93be0a994402cd9e447a11e7f8eba8
parented19b739c5c76ad241d30f6c6a5ee96fb284f4cf
ARM: 6657/1: hw_breakpoint: fix ptrace breakpoint advertising on unsupported arch

The ptrace debug information register was advertising breakpoint and
watchpoint resources for unsupported debug architectures. This meant
that setting breakpoints on these architectures would appear to succeed,
although they would never fire in reality.

This patch fixes the breakpoint slot probing so that it returns 0 when
running on an unsupported debug architecture.

Reported-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
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