aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/loongarch/include/asm/asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/loongarch/include/asm/asm.h')
-rw-r--r--arch/loongarch/include/asm/asm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/asm.h b/arch/loongarch/include/asm/asm.h
index 40eea6aa469e..f591b3245def 100644
--- a/arch/loongarch/include/asm/asm.h
+++ b/arch/loongarch/include/asm/asm.h
@@ -188,4 +188,14 @@
#define PTRLOG 3
#endif
+/* Annotate a function as being unsuitable for kprobes. */
+#ifdef CONFIG_KPROBES
+#define _ASM_NOKPROBE(name) \
+ .pushsection "_kprobe_blacklist", "aw"; \
+ .quad name; \
+ .popsection
+#else
+#define _ASM_NOKPROBE(name)
+#endif
+
#endif /* __ASM_ASM_H */