18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 38c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 48c2ecf20Sopenharmony_ci * for more details. 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci#ifndef __ASM_UPROBES_H 78c2ecf20Sopenharmony_ci#define __ASM_UPROBES_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <linux/notifier.h> 108c2ecf20Sopenharmony_ci#include <linux/types.h> 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <asm/break.h> 138c2ecf20Sopenharmony_ci#include <asm/inst.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* 168c2ecf20Sopenharmony_ci * We want this to be defined as union loongarch_instruction but that makes the 178c2ecf20Sopenharmony_ci * generic code blow up. 188c2ecf20Sopenharmony_ci */ 198c2ecf20Sopenharmony_citypedef u32 uprobe_opcode_t; 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define MAX_UINSN_BYTES 8 228c2ecf20Sopenharmony_ci#define UPROBE_XOL_SLOT_BYTES 128 /* Max. cache line size */ 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define UPROBE_BRK_UPROBE 0x002a000c /* break 12 */ 258c2ecf20Sopenharmony_ci#define UPROBE_BRK_UPROBE_XOL 0x002a000d /* break 13 */ 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#define UPROBE_SWBP_INSN UPROBE_BRK_UPROBE 288c2ecf20Sopenharmony_ci#define UPROBE_SWBP_INSN_SIZE 4 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistruct arch_uprobe { 318c2ecf20Sopenharmony_ci unsigned long resume_era; 328c2ecf20Sopenharmony_ci u32 insn[2]; 338c2ecf20Sopenharmony_ci u32 ixol[2]; 348c2ecf20Sopenharmony_ci}; 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_cistruct arch_uprobe_task { 378c2ecf20Sopenharmony_ci unsigned long saved_trap_nr; 388c2ecf20Sopenharmony_ci}; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#endif /* __ASM_UPROBES_H */ 41