diff options
Diffstat (limited to 'arch/arm/kernel/probes.c')
| -rw-r--r-- | arch/arm/kernel/probes.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/kernel/probes.c b/arch/arm/kernel/probes.c index b41873f33e69..a8ab540d7e73 100644 --- a/arch/arm/kernel/probes.c +++ b/arch/arm/kernel/probes.c | |||
| @@ -202,13 +202,14 @@ prepare_emulated_insn(probes_opcode_t insn, struct arch_probes_insn *asi, | |||
| 202 | #ifdef CONFIG_THUMB2_KERNEL | 202 | #ifdef CONFIG_THUMB2_KERNEL |
| 203 | if (thumb) { | 203 | if (thumb) { |
| 204 | u16 *thumb_insn = (u16 *)asi->insn; | 204 | u16 *thumb_insn = (u16 *)asi->insn; |
| 205 | thumb_insn[1] = 0x4770; /* Thumb bx lr */ | 205 | /* Thumb bx lr */ |
| 206 | thumb_insn[2] = 0x4770; /* Thumb bx lr */ | 206 | thumb_insn[1] = __opcode_to_mem_thumb16(0x4770); |
| 207 | thumb_insn[2] = __opcode_to_mem_thumb16(0x4770); | ||
| 207 | return insn; | 208 | return insn; |
| 208 | } | 209 | } |
| 209 | asi->insn[1] = 0xe12fff1e; /* ARM bx lr */ | 210 | asi->insn[1] = __opcode_to_mem_arm(0xe12fff1e); /* ARM bx lr */ |
| 210 | #else | 211 | #else |
| 211 | asi->insn[1] = 0xe1a0f00e; /* mov pc, lr */ | 212 | asi->insn[1] = __opcode_to_mem_arm(0xe1a0f00e); /* mov pc, lr */ |
| 212 | #endif | 213 | #endif |
| 213 | /* Make an ARM instruction unconditional */ | 214 | /* Make an ARM instruction unconditional */ |
| 214 | if (insn < 0xe0000000) | 215 | if (insn < 0xe0000000) |
| @@ -228,12 +229,12 @@ set_emulated_insn(probes_opcode_t insn, struct arch_probes_insn *asi, | |||
| 228 | if (thumb) { | 229 | if (thumb) { |
| 229 | u16 *ip = (u16 *)asi->insn; | 230 | u16 *ip = (u16 *)asi->insn; |
| 230 | if (is_wide_instruction(insn)) | 231 | if (is_wide_instruction(insn)) |
| 231 | *ip++ = insn >> 16; | 232 | *ip++ = __opcode_to_mem_thumb16(insn >> 16); |
| 232 | *ip++ = insn; | 233 | *ip++ = __opcode_to_mem_thumb16(insn); |
| 233 | return; | 234 | return; |
| 234 | } | 235 | } |
| 235 | #endif | 236 | #endif |
| 236 | asi->insn[0] = insn; | 237 | asi->insn[0] = __opcode_to_mem_arm(insn); |
| 237 | } | 238 | } |
| 238 | 239 | ||
| 239 | /* | 240 | /* |
