arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
[sfrench/cifs-2.6.git] / arch / arm64 / kernel / ftrace.c
index fc62dfe73f933a157ddf968217529de1e232f6c5..4506c4a90ac10fbe7910da0d95e9bdaf50ac3945 100644 (file)
@@ -244,8 +244,6 @@ void arch_ftrace_update_code(int command)
  * on the way back to parent. For this purpose, this function is called
  * in _mcount() or ftrace_caller() to replace return address (*parent) on
  * the call stack to return_to_handler.
- *
- * Note that @frame_pointer is used only for sanity check later.
  */
 void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent,
                           unsigned long frame_pointer)
@@ -263,8 +261,10 @@ void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent,
         */
        old = *parent;
 
-       if (!function_graph_enter(old, self_addr, frame_pointer, NULL))
+       if (!function_graph_enter(old, self_addr, frame_pointer,
+           (void *)frame_pointer)) {
                *parent = return_hooker;
+       }
 }
 
 #ifdef CONFIG_DYNAMIC_FTRACE