]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/watchpoint: Don't call dar_within_range() for Book3S
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>
Sat, 22 Feb 2020 08:20:49 +0000 (13:50 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 24 Feb 2020 00:19:35 +0000 (11:19 +1100)
commitba27ef0e226785a5e33d1f57543fe66752f5fdaa
treeb24869e501a6cae94bc6b183880048362383f276
parentce5190adf701753c0b4de231828614795e7eca0d
powerpc/watchpoint: Don't call dar_within_range() for Book3S

DAR is set to the first byte of overlap between actual access and
watched range at DSI on Book3S processor. But actual access range
might or might not be within user asked range. So for Book3S, it
must not call dar_within_range().

This revert portion of commit 86f79f063497 ("powerpc/hw_breakpoints:
Rewrite 8xx breakpoints to allow any address range size.").

Before patch:
  # ./tools/testing/selftests/powerpc/ptrace/perf-hwbreak
  ...
  TESTED: No overlap
  FAILED: Partial overlap: 0 != 2
  TESTED: Partial overlap
  TESTED: No overlap
  FAILED: Full overlap: 0 != 2
  failure: perf_hwbreak

After patch:
  TESTED: No overlap
  TESTED: Partial overlap
  TESTED: Partial overlap
  TESTED: No overlap
  TESTED: Full overlap
  success: perf_hwbreak

Fixes: 86f79f063497 ("powerpc/hw_breakpoints: Rewrite 8xx breakpoints to allow any address range size.")
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200222082049.330435-1-ravi.bangoria@linux.ibm.com
arch/powerpc/kernel/hw_breakpoint.c