File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,16 +79,14 @@ static unsigned long __ref adjust_address(struct dyn_ftrace *rec,
7979 return (unsigned long )& ftrace_regs_caller_from_init ;
8080}
8181
82- int ftrace_arch_code_modify_prepare (void )
82+ void ftrace_arch_code_modify_prepare (void )
8383{
84- return 0 ;
8584}
8685
87- int ftrace_arch_code_modify_post_process (void )
86+ void ftrace_arch_code_modify_post_process (void )
8887{
8988 /* Make sure any TLB misses during machine stop are cleared. */
9089 flush_tlb_all ();
91- return 0 ;
9290}
9391
9492static unsigned long ftrace_call_replace (unsigned long pc , unsigned long addr ,
Original file line number Diff line number Diff line change 1212#include <asm/patch.h>
1313
1414#ifdef CONFIG_DYNAMIC_FTRACE
15- int ftrace_arch_code_modify_prepare (void ) __acquires (& text_mutex )
15+ void ftrace_arch_code_modify_prepare (void ) __acquires (& text_mutex )
1616{
1717 mutex_lock (& text_mutex );
18- return 0 ;
1918}
2019
21- int ftrace_arch_code_modify_post_process (void ) __releases (& text_mutex )
20+ void ftrace_arch_code_modify_post_process (void ) __releases (& text_mutex )
2221{
2322 mutex_unlock (& text_mutex );
24- return 0 ;
2523}
2624
2725static int ftrace_check_current_call (unsigned long hook_pos ,
Original file line number Diff line number Diff line change @@ -225,14 +225,13 @@ void arch_ftrace_update_code(int command)
225225 ftrace_modify_all_code (command );
226226}
227227
228- int ftrace_arch_code_modify_post_process (void )
228+ void ftrace_arch_code_modify_post_process (void )
229229{
230230 /*
231231 * Flush any pre-fetched instructions on all
232232 * CPUs to make the new code visible.
233233 */
234234 text_poke_sync_lock ();
235- return 0 ;
236235}
237236
238237#ifdef CONFIG_MODULES
Original file line number Diff line number Diff line change 3737
3838static int ftrace_poke_late = 0 ;
3939
40- int ftrace_arch_code_modify_prepare (void )
40+ void ftrace_arch_code_modify_prepare (void )
4141 __acquires (& text_mutex )
4242{
4343 /*
@@ -47,10 +47,9 @@ int ftrace_arch_code_modify_prepare(void)
4747 */
4848 mutex_lock (& text_mutex );
4949 ftrace_poke_late = 1 ;
50- return 0 ;
5150}
5251
53- int ftrace_arch_code_modify_post_process (void )
52+ void ftrace_arch_code_modify_post_process (void )
5453 __releases (& text_mutex )
5554{
5655 /*
@@ -61,7 +60,6 @@ int ftrace_arch_code_modify_post_process(void)
6160 text_poke_finish ();
6261 ftrace_poke_late = 0 ;
6362 mutex_unlock (& text_mutex );
64- return 0 ;
6563}
6664
6765static const char * ftrace_nop_replace (void )
Original file line number Diff line number Diff line change @@ -449,8 +449,8 @@ static inline void stack_tracer_enable(void) { }
449449
450450#ifdef CONFIG_DYNAMIC_FTRACE
451451
452- int ftrace_arch_code_modify_prepare (void );
453- int ftrace_arch_code_modify_post_process (void );
452+ void ftrace_arch_code_modify_prepare (void );
453+ void ftrace_arch_code_modify_post_process (void );
454454
455455enum ftrace_bug_type {
456456 FTRACE_BUG_UNKNOWN ,
Original file line number Diff line number Diff line change @@ -2704,18 +2704,16 @@ ftrace_nop_initialize(struct module *mod, struct dyn_ftrace *rec)
27042704 * archs can override this function if they must do something
27052705 * before the modifying code is performed.
27062706 */
2707- int __weak ftrace_arch_code_modify_prepare (void )
2707+ void __weak ftrace_arch_code_modify_prepare (void )
27082708{
2709- return 0 ;
27102709}
27112710
27122711/*
27132712 * archs can override this function if they must do something
27142713 * after the modifying code is performed.
27152714 */
2716- int __weak ftrace_arch_code_modify_post_process (void )
2715+ void __weak ftrace_arch_code_modify_post_process (void )
27172716{
2718- return 0 ;
27192717}
27202718
27212719void ftrace_modify_all_code (int command )
@@ -2801,12 +2799,7 @@ void __weak arch_ftrace_update_code(int command)
28012799
28022800static void ftrace_run_update_code (int command )
28032801{
2804- int ret ;
2805-
2806- ret = ftrace_arch_code_modify_prepare ();
2807- FTRACE_WARN_ON (ret );
2808- if (ret )
2809- return ;
2802+ ftrace_arch_code_modify_prepare ();
28102803
28112804 /*
28122805 * By default we use stop_machine() to modify the code.
@@ -2816,8 +2809,7 @@ static void ftrace_run_update_code(int command)
28162809 */
28172810 arch_ftrace_update_code (command );
28182811
2819- ret = ftrace_arch_code_modify_post_process ();
2820- FTRACE_WARN_ON (ret );
2812+ ftrace_arch_code_modify_post_process ();
28212813}
28222814
28232815static void ftrace_run_modify_code (struct ftrace_ops * ops , int command ,
You can’t perform that action at this time.
0 commit comments