git: 8af854ea479a - main - linuxkpi: Move `_RET_IP_` to <linux/instruction_pointer.h>
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 06 Apr 2026 19:55:25 UTC
The branch main has been updated by dumbbell:
URL: https://cgit.FreeBSD.org/src/commit/?id=8af854ea479a140a6e284d74e481d0b547408df2
commit 8af854ea479a140a6e284d74e481d0b547408df2
Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2026-03-02 23:06:54 +0000
Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2026-04-06 19:28:08 +0000
linuxkpi: Move `_RET_IP_` to <linux/instruction_pointer.h>
This matches the declaration on Linux.
Reviewed by: bz, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55730
---
.../linuxkpi/common/include/linux/instruction_pointer.h | 13 +++++++++++++
sys/compat/linuxkpi/common/include/linux/kernel.h | 3 +--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h
new file mode 100644
index 000000000000..9dc16781808a
--- /dev/null
+++ b/sys/compat/linuxkpi/common/include/linux/instruction_pointer.h
@@ -0,0 +1,13 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2021 Neel Chauhan
+ * Copyright (c) 2026 The FreeBSD Foundation
+ */
+
+#ifndef _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_
+#define _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_
+
+#define _RET_IP_ __builtin_return_address(0)
+
+#endif /* _LINUXKPI_LINUX_INSTRUCTION_POINTER_H_ */
diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h
index 11a13cbd49b4..880d2f67c517 100644
--- a/sys/compat/linuxkpi/common/include/linux/kernel.h
+++ b/sys/compat/linuxkpi/common/include/linux/kernel.h
@@ -55,6 +55,7 @@
#include <linux/jiffies.h>
#include <linux/log2.h>
#include <linux/kconfig.h>
+#include <linux/instruction_pointer.h>
#include <asm/byteorder.h>
#include <asm/cpufeature.h>
@@ -267,8 +268,6 @@ extern int linuxkpi_debug;
#define u64_to_user_ptr(val) ((void *)(uintptr_t)(val))
-#define _RET_IP_ __builtin_return_address(0)
-
#define offsetofend(t, m) \
(offsetof(t, m) + sizeof((((t *)0)->m)))