Commit 45093b38 authored by Ravi Bangoria's avatar Ravi Bangoria Committed by Michael Ellerman

powerpc/watchpoint/ptrace: Return actual num of available watchpoints

User can ask for num of available watchpoints(dbginfo.num_data_bps)
using ptrace(PPC_PTRACE_GETHWDBGINFO). Return actual number of
available watchpoints on the machine rather than hardcoded 1.
Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Reviewed-by: default avatarMichael Neuling <mikey@neuling.org>
Link: https://lore.kernel.org/r/20200514111741.97993-5-ravi.bangoria@linux.ibm.com
parent a6ba44e8
...@@ -44,7 +44,7 @@ void ppc_gethwdinfo(struct ppc_debug_info *dbginfo) ...@@ -44,7 +44,7 @@ void ppc_gethwdinfo(struct ppc_debug_info *dbginfo)
dbginfo->version = 1; dbginfo->version = 1;
dbginfo->num_instruction_bps = 0; dbginfo->num_instruction_bps = 0;
if (ppc_breakpoint_available()) if (ppc_breakpoint_available())
dbginfo->num_data_bps = 1; dbginfo->num_data_bps = nr_wp_slots();
else else
dbginfo->num_data_bps = 0; dbginfo->num_data_bps = 0;
dbginfo->num_condition_regs = 0; dbginfo->num_condition_regs = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment