1 /* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 */ 6 #ifndef __ASM_UPROBES_H 7 #define __ASM_UPROBES_H 8 9 #include <linux/notifier.h> 10 #include <linux/types.h> 11 12 #include <asm/break.h> 13 #include <asm/inst.h> 14 15 /* 16 * We want this to be defined as union loongarch_instruction but that makes the 17 * generic code blow up. 18 */ 19 typedef u32 uprobe_opcode_t; 20 21 #define MAX_UINSN_BYTES 8 22 #define UPROBE_XOL_SLOT_BYTES 128 /* Max. cache line size */ 23 24 #define UPROBE_BRK_UPROBE 0x002a000c /* break 12 */ 25 #define UPROBE_BRK_UPROBE_XOL 0x002a000d /* break 13 */ 26 27 #define UPROBE_SWBP_INSN UPROBE_BRK_UPROBE 28 #define UPROBE_SWBP_INSN_SIZE 4 29 30 struct arch_uprobe { 31 unsigned long resume_era; 32 u32 insn[2]; 33 u32 ixol[2]; 34 }; 35 36 struct arch_uprobe_task { 37 unsigned long saved_trap_nr; 38 }; 39 40 #endif /* __ASM_UPROBES_H */ 41