Use ppc_function_entry in places where we previously assumed
function descriptors exist.

Signed-off-by: Anton Blanchard <[email protected]>
---
 arch/powerpc/include/asm/kprobes.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/kprobes.h 
b/arch/powerpc/include/asm/kprobes.h
index 7b6feab..af15d4d 100644
--- a/arch/powerpc/include/asm/kprobes.h
+++ b/arch/powerpc/include/asm/kprobes.h
@@ -30,6 +30,7 @@
 #include <linux/ptrace.h>
 #include <linux/percpu.h>
 #include <asm/probes.h>
+#include <asm/code-patching.h>
 
 #define  __ARCH_WANT_KPROBES_INSN_SLOT
 
@@ -56,9 +57,9 @@ typedef ppc_opcode_t kprobe_opcode_t;
                if ((colon = strchr(name, ':')) != NULL) {              \
                        colon++;                                        \
                        if (*colon != '\0' && *colon != '.')            \
-                               addr = *(kprobe_opcode_t **)addr;       \
+                               addr = (kprobe_opcode_t 
*)ppc_function_entry(addr); \
                } else if (name[0] != '.')                              \
-                       addr = *(kprobe_opcode_t **)addr;               \
+                       addr = (kprobe_opcode_t *)ppc_function_entry(addr); \
        } else {                                                        \
                char dot_name[KSYM_NAME_LEN];                           \
                dot_name[0] = '.';                                      \
-- 
1.8.3.2

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to