Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/watchpoints: Explain thread_change_pc() more

The behaviour of the thread_change_pc() function is a bit cryptic
without being more familiar with how the watchpoint logic handles
perf's after-execute semantics.

Expand the comment to explain why we can re-insert the breakpoint and
unset the perf_single_step flag.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230801011744.153973-2-bgray@linux.ibm.com

authored by

Benjamin Gray and committed by
Michael Ellerman
8f8f1cd6 8df99066

+4
+4
arch/powerpc/kernel/hw_breakpoint.c
··· 499 499 * Restores the breakpoint on the debug registers. 500 500 * Invoke this function if it is known that the execution context is 501 501 * about to change to cause loss of MSR_SE settings. 502 + * 503 + * The perf watchpoint will simply re-trigger once the thread is started again, 504 + * and the watchpoint handler will set up MSR_SE and perf_single_step as 505 + * needed. 502 506 */ 503 507 void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs) 504 508 {