drm/panthor: Don't add write fences to the shared BOs
[drm/drm-misc.git] / arch / riscv / include / asm / kprobes.h
blob78ea44f767189214c9c3263c93e10c4c1db91bb8
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copied from arch/arm64/include/asm/kprobes.h
5 * Copyright (C) 2013 Linaro Limited
6 * Copyright (C) 2017 SiFive
7 */
9 #ifndef _ASM_RISCV_KPROBES_H
10 #define _ASM_RISCV_KPROBES_H
12 #include <asm-generic/kprobes.h>
14 #ifdef CONFIG_KPROBES
15 #include <linux/types.h>
16 #include <linux/ptrace.h>
17 #include <linux/percpu.h>
19 #define __ARCH_WANT_KPROBES_INSN_SLOT
20 #define MAX_INSN_SIZE 2
22 #define flush_insn_slot(p) do { } while (0)
23 #define kretprobe_blacklist_size 0
25 #include <asm/probes.h>
27 struct prev_kprobe {
28 struct kprobe *kp;
29 unsigned int status;
32 /* per-cpu kprobe control block */
33 struct kprobe_ctlblk {
34 unsigned int kprobe_status;
35 unsigned long saved_status;
36 struct prev_kprobe prev_kprobe;
39 void arch_remove_kprobe(struct kprobe *p);
40 int kprobe_fault_handler(struct pt_regs *regs, unsigned int trapnr);
41 bool kprobe_breakpoint_handler(struct pt_regs *regs);
42 bool kprobe_single_step_handler(struct pt_regs *regs);
43 #else
44 static inline bool kprobe_breakpoint_handler(struct pt_regs *regs)
46 return false;
49 static inline bool kprobe_single_step_handler(struct pt_regs *regs)
51 return false;
53 #endif /* CONFIG_KPROBES */
54 #endif /* _ASM_RISCV_KPROBES_H */