diff options
| author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2026-03-02 23:06:54 +0000 |
|---|---|---|
| committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2026-04-06 19:28:08 +0000 |
| commit | 8af854ea479a140a6e284d74e481d0b547408df2 (patch) | |
| tree | 29cc632b1b652e8967024e310333b45c72e61ad9 | |
| parent | 362136ed4987230269740f54531f6a945f00d135 (diff) | |
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
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/instruction_pointer.h | 13 | ||||
| -rw-r--r-- | 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))) |
