Skip to content

Commit 27646b2

Browse files
BenjaminGrayNp1mpe
authored andcommitted
powerpc/watchpoints: Annotate atomic context in more places
It can be easy to miss that the notifier mechanism invokes the callbacks in an atomic context, so add some comments to that effect on the two handlers we register here. Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230829063457.54157-4-bgray@linux.ibm.com
1 parent 3241f26 commit 27646b2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arch/powerpc/kernel/hw_breakpoint.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ static void handle_p10dd1_spurious_exception(struct perf_event **bp,
368368
}
369369
}
370370

371+
/*
372+
* Handle a DABR or DAWR exception.
373+
*
374+
* Called in atomic context.
375+
*/
371376
int hw_breakpoint_handler(struct die_args *args)
372377
{
373378
bool err = false;
@@ -495,6 +500,8 @@ NOKPROBE_SYMBOL(hw_breakpoint_handler);
495500

496501
/*
497502
* Handle single-step exceptions following a DABR hit.
503+
*
504+
* Called in atomic context.
498505
*/
499506
static int single_step_dabr_instruction(struct die_args *args)
500507
{
@@ -546,6 +553,8 @@ NOKPROBE_SYMBOL(single_step_dabr_instruction);
546553

547554
/*
548555
* Handle debug exception notifications.
556+
*
557+
* Called in atomic context.
549558
*/
550559
int hw_breakpoint_exceptions_notify(
551560
struct notifier_block *unused, unsigned long val, void *data)

0 commit comments

Comments
 (0)