blob: 5bf65f5d44a99d61aa5f02dade46ab4e479f9527 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-or-later */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002#ifndef _ASM_UPROBES_H
3#define _ASM_UPROBES_H
4/*
5 * User-space Probes (UProbes) for powerpc
6 *
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00007 * 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 Deprez157378f2022-04-04 15:47:50 +020014#include <asm/inst.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000015
16typedef ppc_opcode_t uprobe_opcode_t;
17
Olivier Deprez157378f2022-04-04 15:47:50 +020018#define MAX_UINSN_BYTES 8
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000019#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
25struct arch_uprobe {
26 union {
Olivier Deprez157378f2022-04-04 15:47:50 +020027 struct ppc_inst insn;
28 struct ppc_inst ixol;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000029 };
30};
31
32struct arch_uprobe_task {
33 unsigned long saved_trap_nr;
34};
35
36#endif /* _ASM_UPROBES_H */