[PATCH v4 08/13] arm64: debug: refactor reinstall_suspended_bps()

Will Deacon will at kernel.org
Fri Jun 27 08:46:28 PDT 2025


On Fri, Jun 20, 2025 at 10:12:02PM +0100, Ada Couprie Diaz wrote:
> `reinstall_suspended_bps()` plays a key part in the stepping process
> when we have hardware breakpoints and watchpoints enabled.
> It checks if we need to step one, will re-enable it if it has
> been handled and will return whether or not we need to proceed with
> a single-step.
> 
> However, the current naming and return values make it harder to understand
> the logic and goal of the function.
> 
> Rename it `try_step_suspended_breakpoints()` and change the return value
> to a boolean, aligning it with similar functions used in
> `do_el0_undef()` like `try_emulate_mrs()`, and making its behaviour
> more obvious.
> 
> Signed-off-by: Ada Couprie Diaz <ada.coupriediaz at arm.com>
> Tested-by: Luis Claudio R. Goncalves <lgoncalv at redhat.com>
> Reviewed-by: Anshuman Khandual <anshuman.khandual at arm.com>
> ---
>  arch/arm64/include/asm/debug-monitors.h |  6 +++---
>  arch/arm64/kernel/debug-monitors.c      |  2 +-
>  arch/arm64/kernel/hw_breakpoint.c       | 25 ++++++++++++-------------
>  3 files changed, 16 insertions(+), 17 deletions(-)

Reviewed-by: Will Deacon <will at kernel.org>

Will



More information about the linux-arm-kernel mailing list