--- zzzz-none-000/linux-4.19.183/arch/arm/kernel/hw_breakpoint.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/arch/arm/kernel/hw_breakpoint.c 2023-06-28 08:54:18.000000000 +0000 @@ -728,6 +728,10 @@ return !user_mode(regs) && info->ctrl.privilege == ARM_BREAKPOINT_USER; } +#if IS_ENABLED(CONFIG_AVM_WP) +extern int avm_wp_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs); +#endif + static void watchpoint_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { @@ -740,6 +744,10 @@ slots = this_cpu_ptr(wp_on_reg); +#if IS_ENABLED(CONFIG_AVM_WP) + if (!avm_wp_handler(addr, fsr, regs)) return; +#endif + /* * Find all watchpoints that match the reported address. If no exact * match is found. Attribute the hit to the closest watchpoint.