1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * User-space Probes (UProbes) for sparc
7 * Copyright (C) 2013 Oracle, Inc.
10 * Jose E. Marchesi <jose.marchesi@oracle.com>
11 * Eric Saint Etienne <eric.saint.etienne@oracle.com>
14 typedef u32 uprobe_opcode_t;
16 #define MAX_UINSN_BYTES 4
17 #define UPROBE_XOL_SLOT_BYTES (MAX_UINSN_BYTES * 2)
19 #define UPROBE_SWBP_INSN_SIZE 4
20 #define UPROBE_SWBP_INSN 0x91d02073 /* ta 0x73 */
21 #define UPROBE_STP_INSN 0x91d02074 /* ta 0x74 */
23 #define ANNUL_BIT (1 << 29)
27 u8 insn[MAX_UINSN_BYTES];
32 struct arch_uprobe_task {
38 struct notifier_block;
40 extern int arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long addr);
41 extern int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs);
42 extern int arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs);
43 extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
44 extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data);
45 extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs);
47 #endif /* _ASM_UPROBES_H */