Commit bb2c458b8b8c8a53f65b78051d22a0f13d53abcb

Authored by Andreas Schwab
Committed by Benjamin Herrenschmidt
1 parent 4dfbf290ae

powerpc: Update compat_arch_ptrace

Update compat_arch_ptrace to follow recent changes in
PTRACE_GET_DEBUGREG and the addition of
PPC_PTRACE_{GETHWDBGINFO|{SET|DEL}HWDEBUG}.  The latter three can be
forwarded to arch_ptrace unchanged.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

arch/powerpc/kernel/ptrace32.c
... ... @@ -280,7 +280,11 @@
280 280 /* We only support one DABR and no IABRS at the moment */
281 281 if (addr > 0)
282 282 break;
  283 +#ifdef CONFIG_PPC_ADV_DEBUG_REGS
  284 + ret = put_user(child->thread.dac1, (u32 __user *)data);
  285 +#else
283 286 ret = put_user(child->thread.dabr, (u32 __user *)data);
  287 +#endif
284 288 break;
285 289 }
286 290  
... ... @@ -312,6 +316,9 @@
312 316 case PTRACE_SET_DEBUGREG:
313 317 case PTRACE_SYSCALL:
314 318 case PTRACE_CONT:
  319 + case PPC_PTRACE_GETHWDBGINFO:
  320 + case PPC_PTRACE_SETHWDEBUG:
  321 + case PPC_PTRACE_DELHWDEBUG:
315 322 ret = arch_ptrace(child, request, addr, data);
316 323 break;
317 324