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: Simplify watchpoint reinsertion

We only remove watchpoints when they have the perf_single_step flag set,
so we can reinsert them during the first iteration.

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

authored by

Benjamin Gray and committed by
Michael Ellerman
5a2d8b9c 1e60f356

+1 -11
+1 -11
arch/powerpc/kernel/hw_breakpoint.c
··· 772 772 perf_bp_event(bp, regs); 773 773 774 774 info->perf_single_step = false; 775 - } 776 - 777 - if (!found) 778 - return NOTIFY_DONE; 779 - 780 - for (int i = 0; i < nr_wp_slots(); i++) { 781 - struct perf_event *bp = __this_cpu_read(bp_per_reg[i]); 782 - if (!bp) 783 - continue; 784 - 785 775 __set_breakpoint(i, counter_arch_bp(bp)); 786 776 } 787 777 ··· 779 789 * If the process was being single-stepped by ptrace, let the 780 790 * other single-step actions occur (e.g. generate SIGTRAP). 781 791 */ 782 - if (test_thread_flag(TIF_SINGLESTEP)) 792 + if (!found || test_thread_flag(TIF_SINGLESTEP)) 783 793 return NOTIFY_DONE; 784 794 785 795 return NOTIFY_STOP;