powerpc: declare set_breakpoint() static
authorChristophe Leroy <christophe.leroy@c-s.fr>
Thu, 5 Jul 2018 16:25:05 +0000 (16:25 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 30 Jul 2018 12:48:18 +0000 (22:48 +1000)
set_breakpoint() is only used in process.c so make it static

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/debug.h
arch/powerpc/kernel/process.c

index ce5da214ffe5b9571b1e10ec6fb757dba2845170..7756026b95ca8dbacb178176d635cd52a4bc5e43 100644 (file)
@@ -45,7 +45,6 @@ static inline int debugger_break_match(struct pt_regs *regs) { return 0; }
 static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; }
 #endif
 
-void set_breakpoint(struct arch_hw_breakpoint *brk);
 void __set_breakpoint(struct arch_hw_breakpoint *brk);
 bool ppc_breakpoint_available(void);
 #ifdef CONFIG_PPC_ADV_DEBUG_REGS
index e9533b4d2f08e109b229e4e5a27071ec6e0a078f..2172f99086339e76df1746edd166b582a1d9f9d5 100644 (file)
@@ -717,6 +717,13 @@ void switch_booke_debug_regs(struct debug_reg *new_debug)
 EXPORT_SYMBOL_GPL(switch_booke_debug_regs);
 #else  /* !CONFIG_PPC_ADV_DEBUG_REGS */
 #ifndef CONFIG_HAVE_HW_BREAKPOINT
+static void set_breakpoint(struct arch_hw_breakpoint *brk)
+{
+       preempt_disable();
+       __set_breakpoint(brk);
+       preempt_enable();
+}
+
 static void set_debug_reg_defaults(struct thread_struct *thread)
 {
        thread->hw_brk.address = 0;
@@ -829,13 +836,6 @@ void __set_breakpoint(struct arch_hw_breakpoint *brk)
                WARN_ON_ONCE(1);
 }
 
-void set_breakpoint(struct arch_hw_breakpoint *brk)
-{
-       preempt_disable();
-       __set_breakpoint(brk);
-       preempt_enable();
-}
-
 /* Check if we have DAWR or DABR hardware */
 bool ppc_breakpoint_available(void)
 {