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
This commit is contained in:
Jean-Sébastien Pédron
2026-03-03 00:06:54 +01:00
parent 362136ed49
commit 8af854ea47
2 changed files with 14 additions and 2 deletions
@@ -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_ */
@@ -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)))