}
 }
 
-void kgdb_disable_hw_debug(struct pt_regs *regs)
+static void bfin_disable_hw_debug(struct pt_regs *regs)
 {
        /* Disable hardware debugging while we are in kgdb */
        bfin_write_WPIACTL(0);
 #endif
        .set_hw_breakpoint = bfin_set_hw_break,
        .remove_hw_breakpoint = bfin_remove_hw_break,
+       .disable_hw_break = bfin_disable_hw_debug,
        .remove_all_hw_break = bfin_remove_all_hw_break,
        .correct_hw_break = bfin_correct_hw_break,
 };
 
  *     disable hardware debugging while it is processing gdb packets or
  *     handling exception.
  */
-void kgdb_disable_hw_debug(struct pt_regs *regs)
+static void kgdb_disable_hw_debug(struct pt_regs *regs)
 {
        int i;
        int cpu = raw_smp_processor_id();
        .flags                  = KGDB_HW_BREAKPOINT,
        .set_hw_breakpoint      = kgdb_set_hw_break,
        .remove_hw_breakpoint   = kgdb_remove_hw_break,
+       .disable_hw_break       = kgdb_disable_hw_debug,
        .remove_all_hw_break    = kgdb_remove_all_hw_break,
        .correct_hw_break       = kgdb_correct_hw_break,
 };
 
  */
 extern int kgdb_skipexception(int exception, struct pt_regs *regs);
 
-/**
- *     kgdb_disable_hw_debug - (optional) Disable hardware debugging hook
- *     @regs: Current &struct pt_regs.
- *
- *     This function will be called if the particular architecture must
- *     disable hardware debugging while it is processing gdb packets or
- *     handling exception.
- */
-extern void kgdb_disable_hw_debug(struct pt_regs *regs);
-
 struct tasklet_struct;
 struct task_struct;
 struct uart_port;
  * breakpoint.
  * @remove_hw_breakpoint: Allow an architecture to specify how to remove a
  * hardware breakpoint.
+ * @disable_hw_break: Allow an architecture to specify how to disable
+ * hardware breakpoints for a single cpu.
  * @remove_all_hw_break: Allow an architecture to specify how to remove all
  * hardware breakpoints.
  * @correct_hw_break: Allow an architecture to specify how to correct the
        int     (*remove_breakpoint)(unsigned long, char *);
        int     (*set_hw_breakpoint)(unsigned long, int, enum kgdb_bptype);
        int     (*remove_hw_breakpoint)(unsigned long, int, enum kgdb_bptype);
+       void    (*disable_hw_break)(struct pt_regs *regs);
        void    (*remove_all_hw_break)(void);
        void    (*correct_hw_break)(void);
 };
 
        return 0;
 }
 
-/**
- *     kgdb_disable_hw_debug - Disable hardware debugging while we in kgdb.
- *     @regs: Current &struct pt_regs.
- *
- *     This function will be called if the particular architecture must
- *     disable hardware debugging while it is processing gdb packets or
- *     handling exception.
- */
-void __weak kgdb_disable_hw_debug(struct pt_regs *regs)
-{
-}
-
 /*
  * Some architectures need cache flushes when we set/clear a
  * breakpoint:
                atomic_inc(&masters_in_kgdb);
        else
                atomic_inc(&slaves_in_kgdb);
-       kgdb_disable_hw_debug(ks->linux_regs);
+
+       if (arch_kgdb_ops.disable_hw_break)
+               arch_kgdb_ops.disable_hw_break(regs);
 
 acquirelock:
        /*