OSDN Git Service

powerpc: Update ptrace to use ppc_breakpoint_available()
authorMichael Neuling <mikey@neuling.org>
Tue, 27 Mar 2018 04:37:18 +0000 (15:37 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Mar 2018 12:52:44 +0000 (23:52 +1100)
commit85ce9a5d57bec126d19610d6e77f9e6e4eaea635
tree4c787a07c93c73500e80833bc5a31a150fea98be
parent404b27d66ed657ebccb08a9c8f8f65523e9b666b
powerpc: Update ptrace to use ppc_breakpoint_available()

This updates the ptrace code to use ppc_breakpoint_available().

We now advertise via PPC_PTRACE_GETHWDBGINFO zero breakpoints when the
DAWR is missing (ie. POWER9). This results in GDB falling back to
software emulation of the breakpoint (which is slow).

For the features advertised by PPC_PTRACE_GETHWDBGINFO, we keep
advertising DAWR as if we don't GDB assumes 1 breakpoint irrespective
of the number of breakpoints advertised. GDB then fails later when
trying to set this one breakpoint.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/hw_breakpoint.c
arch/powerpc/kernel/ptrace.c