disasm.c (27eb2c4b3d3e13f376a359e293c212a2e9407af5) | disasm.c (1736a56f3d1d5765fa8953d39a900a494d7e415c) |
---|---|
1/* 2 * several functions that help interpret ARC instructions 3 * used for unaligned accesses, kprobes and kgdb 4 * 5 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as 9 * published by the Free Software Foundation. 10 */ 11 12#include <linux/types.h> 13#include <linux/kprobes.h> 14#include <linux/slab.h> 15#include <linux/uaccess.h> 16#include <asm/disasm.h> 17 | 1/* 2 * several functions that help interpret ARC instructions 3 * used for unaligned accesses, kprobes and kgdb 4 * 5 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as 9 * published by the Free Software Foundation. 10 */ 11 12#include <linux/types.h> 13#include <linux/kprobes.h> 14#include <linux/slab.h> 15#include <linux/uaccess.h> 16#include <asm/disasm.h> 17 |
18#if defined(CONFIG_KGDB) || defined(CONFIG_ARC_MISALIGN_ACCESS) || \ | 18#if defined(CONFIG_KGDB) || defined(CONFIG_ARC_EMUL_UNALIGNED) || \ |
19 defined(CONFIG_KPROBES) 20 21/* disasm_instr: Analyses instruction at addr, stores 22 * findings in *state 23 */ 24void __kprobes disasm_instr(unsigned long addr, struct disasm_state *state, 25 int userspace, struct pt_regs *regs, struct callee_regs *cregs) 26{ --- 503 unchanged lines hidden (view full) --- 530 if (!(regs->status32 & STATUS32_L) && (*next_pc == regs->lp_end) 531 && (regs->lp_count > 1)) { 532 *next_pc = regs->lp_start; 533 } 534 535 return instr.is_branch; 536} 537 | 19 defined(CONFIG_KPROBES) 20 21/* disasm_instr: Analyses instruction at addr, stores 22 * findings in *state 23 */ 24void __kprobes disasm_instr(unsigned long addr, struct disasm_state *state, 25 int userspace, struct pt_regs *regs, struct callee_regs *cregs) 26{ --- 503 unchanged lines hidden (view full) --- 530 if (!(regs->status32 & STATUS32_L) && (*next_pc == regs->lp_end) 531 && (regs->lp_count > 1)) { 532 *next_pc = regs->lp_start; 533 } 534 535 return instr.is_branch; 536} 537 |
538#endif /* CONFIG_KGDB || CONFIG_ARC_MISALIGN_ACCESS || CONFIG_KPROBES */ | 538#endif /* CONFIG_KGDB || CONFIG_ARC_EMUL_UNALIGNED || CONFIG_KPROBES */ |