diff options
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r-- | arch/arm/kernel/traps.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index caf96da27360..6125f259b7b5 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -342,15 +342,17 @@ void arm_notify_die(const char *str, struct pt_regs *regs, | |||
342 | int is_valid_bugaddr(unsigned long pc) | 342 | int is_valid_bugaddr(unsigned long pc) |
343 | { | 343 | { |
344 | #ifdef CONFIG_THUMB2_KERNEL | 344 | #ifdef CONFIG_THUMB2_KERNEL |
345 | unsigned short bkpt; | 345 | u16 bkpt; |
346 | u16 insn = __opcode_to_mem_thumb16(BUG_INSTR_VALUE); | ||
346 | #else | 347 | #else |
347 | unsigned long bkpt; | 348 | u32 bkpt; |
349 | u32 insn = __opcode_to_mem_arm(BUG_INSTR_VALUE); | ||
348 | #endif | 350 | #endif |
349 | 351 | ||
350 | if (probe_kernel_address((unsigned *)pc, bkpt)) | 352 | if (probe_kernel_address((unsigned *)pc, bkpt)) |
351 | return 0; | 353 | return 0; |
352 | 354 | ||
353 | return bkpt == BUG_INSTR_VALUE; | 355 | return bkpt == insn; |
354 | } | 356 | } |
355 | 357 | ||
356 | #endif | 358 | #endif |