]> Git Repo - linux.git/blobdiff - kernel/livepatch/patch.c
vmcore: convert copy_oldmem_page() to take an iov_iter
[linux.git] / kernel / livepatch / patch.c
index fe316c021d73dd7556b44ecc0bac802d78df6d21..c172bf92b576bc0e777402d995b7157c7c6d0914 100644 (file)
@@ -124,19 +124,6 @@ unlock:
        ftrace_test_recursion_unlock(bit);
 }
 
-/*
- * Convert a function address into the appropriate ftrace location.
- *
- * Usually this is just the address of the function, but on some architectures
- * it's more complicated so allow them to provide a custom behaviour.
- */
-#ifndef klp_get_ftrace_location
-static unsigned long klp_get_ftrace_location(unsigned long faddr)
-{
-       return faddr;
-}
-#endif
-
 static void klp_unpatch_func(struct klp_func *func)
 {
        struct klp_ops *ops;
@@ -153,8 +140,7 @@ static void klp_unpatch_func(struct klp_func *func)
        if (list_is_singular(&ops->func_stack)) {
                unsigned long ftrace_loc;
 
-               ftrace_loc =
-                       klp_get_ftrace_location((unsigned long)func->old_func);
+               ftrace_loc = ftrace_location((unsigned long)func->old_func);
                if (WARN_ON(!ftrace_loc))
                        return;
 
@@ -186,8 +172,7 @@ static int klp_patch_func(struct klp_func *func)
        if (!ops) {
                unsigned long ftrace_loc;
 
-               ftrace_loc =
-                       klp_get_ftrace_location((unsigned long)func->old_func);
+               ftrace_loc = ftrace_location((unsigned long)func->old_func);
                if (!ftrace_loc) {
                        pr_err("failed to find location for function '%s'\n",
                                func->old_name);
This page took 0.033418 seconds and 4 git commands to generate.