aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/kprobes.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/kprobes.h')
-rw-r--r--arch/powerpc/include/asm/kprobes.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h
index be0171afdc0f..7b6feab6fd26 100644
--- a/arch/powerpc/include/asm/kprobes.h
+++ b/arch/powerpc/include/asm/kprobes.h
@@ -29,21 +29,16 @@
29#include <linux/types.h> 29#include <linux/types.h>
30#include <linux/ptrace.h> 30#include <linux/ptrace.h>
31#include <linux/percpu.h> 31#include <linux/percpu.h>
32#include <asm/probes.h>
32 33
33#define __ARCH_WANT_KPROBES_INSN_SLOT 34#define __ARCH_WANT_KPROBES_INSN_SLOT
34 35
35struct pt_regs; 36struct pt_regs;
36struct kprobe; 37struct kprobe;
37 38
38typedef unsigned int kprobe_opcode_t; 39typedef ppc_opcode_t kprobe_opcode_t;
39#define BREAKPOINT_INSTRUCTION 0x7fe00008 /* trap */
40#define MAX_INSN_SIZE 1 40#define MAX_INSN_SIZE 1
41 41
42#define IS_TW(instr) (((instr) & 0xfc0007fe) == 0x7c000008)
43#define IS_TD(instr) (((instr) & 0xfc0007fe) == 0x7c000088)
44#define IS_TDI(instr) (((instr) & 0xfc000000) == 0x08000000)
45#define IS_TWI(instr) (((instr) & 0xfc000000) == 0x0c000000)
46
47#ifdef CONFIG_PPC64 42#ifdef CONFIG_PPC64
48/* 43/*
49 * 64bit powerpc uses function descriptors. 44 * 64bit powerpc uses function descriptors.
@@ -72,12 +67,6 @@ typedef unsigned int kprobe_opcode_t;
72 addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); \ 67 addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); \
73 } \ 68 } \
74} 69}
75
76#define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \
77 IS_TWI(instr) || IS_TDI(instr))
78#else
79/* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */
80#define is_trap(instr) (IS_TW(instr) || IS_TWI(instr))
81#endif 70#endif
82 71
83#define flush_insn_slot(p) do { } while (0) 72#define flush_insn_slot(p) do { } while (0)