David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | #ifndef _ASM_UPROBES_H |
| 3 | #define _ASM_UPROBES_H |
| 4 | /* |
| 5 | * User-space Probes (UProbes) for powerpc |
| 6 | * |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 7 | * Copyright IBM Corporation, 2007-2012 |
| 8 | * |
| 9 | * Adapted from the x86 port by Ananth N Mavinakayanahalli <ananth@in.ibm.com> |
| 10 | */ |
| 11 | |
| 12 | #include <linux/notifier.h> |
| 13 | #include <asm/probes.h> |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 14 | #include <asm/inst.h> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 15 | |
| 16 | typedef ppc_opcode_t uprobe_opcode_t; |
| 17 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 18 | #define MAX_UINSN_BYTES 8 |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 19 | #define UPROBE_XOL_SLOT_BYTES (MAX_UINSN_BYTES) |
| 20 | |
| 21 | /* The following alias is needed for reference from arch-agnostic code */ |
| 22 | #define UPROBE_SWBP_INSN BREAKPOINT_INSTRUCTION |
| 23 | #define UPROBE_SWBP_INSN_SIZE 4 /* swbp insn size in bytes */ |
| 24 | |
| 25 | struct arch_uprobe { |
| 26 | union { |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 27 | struct ppc_inst insn; |
| 28 | struct ppc_inst ixol; |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 29 | }; |
| 30 | }; |
| 31 | |
| 32 | struct arch_uprobe_task { |
| 33 | unsigned long saved_trap_nr; |
| 34 | }; |
| 35 | |
| 36 | #endif /* _ASM_UPROBES_H */ |