From 713b4ce8ef46d7df4ffe50ab6733bb128dbe3cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Thu, 30 Apr 2026 00:14:59 +0200 Subject: [PATCH] linuxkpi: Add `copy_from_user_inatomic_nontemporal()` function In Linux 7.1, `__copy_from_user_inatomic_nocache()` was renamed to `copy_from_user_inatomic_nontemporal()`. This change was backported to several LTS branches. This includes Linux 6.12.x and the i915 DRM driver started to use it in that version. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56719 --- sys/compat/linuxkpi/common/include/linux/uaccess.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/uaccess.h b/sys/compat/linuxkpi/common/include/linux/uaccess.h index 660e84e6af3..97fb2e3a742 100644 --- a/sys/compat/linuxkpi/common/include/linux/uaccess.h +++ b/sys/compat/linuxkpi/common/include/linux/uaccess.h @@ -111,5 +111,12 @@ __copy_from_user_inatomic(void *to, const void __user *from, } #define __copy_from_user_inatomic_nocache(to, from, n) \ __copy_from_user_inatomic((to), (from), (n)) +/* + * __copy_from_user_inatomic_nocache() was renamed to + * copy_from_user_inatomic_nontemporal() in Linux 7.1. The change was + * backported to at least several LTS branches. + */ +#define copy_from_user_inatomic_nontemporal(to, from, n) \ + __copy_from_user_inatomic((to), (from), (n)) #endif /* _LINUXKPI_LINUX_UACCESS_H_ */