Date: Wed, 29 Apr 2026 21:43:07 +0000
From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron <dumbbell@FreeBSD.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject: git: 9fb9b04ca3eb - stable/15 - linuxkpi: Move {lower,upper}_32_bits macros to <linux/wordpart.h>
Message-ID: <69f27b6b.18e8b.4e93d997@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=9fb9b04ca3ebcf3d58d444e66189d42b54a171ba commit 9fb9b04ca3ebcf3d58d444e66189d42b54a171ba Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> AuthorDate: 2026-04-11 15:21:53 +0000 Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> CommitDate: 2026-04-29 21:04:09 +0000 linuxkpi: Move {lower,upper}_32_bits macros to <linux/wordpart.h> ... from <linux/compiler.h>. <linux/wordpart.h> is the header defining them on Linux 6.12 (I didn't check older versions). <linux/wordpart.h> is also included from <linux/kernel.h>. The DRM generic code started to depend on <linux/wordpart.h> in Linux 6.12. Reviewed by: bz Sponsored by: The FreeBSD Foundation (cherry picked from commit 0a2f3b8ef16786a44fc88afd8862920df4527a3c) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 3 --- sys/compat/linuxkpi/common/include/linux/kernel.h | 1 + sys/compat/linuxkpi/common/include/linux/wordpart.h | 13 +++++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 90d907dd4d45..4fcd1f9f342b 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -66,9 +66,6 @@ #define barrier() __asm__ __volatile__("": : :"memory") -#define lower_32_bits(n) ((u32)(n)) -#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) - #define WRITE_ONCE(x,v) do { \ barrier(); \ (*(volatile __typeof(x) *)(uintptr_t)&(x)) = (v); \ diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 5e94a5cee28c..8caaf520fd3e 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -57,6 +57,7 @@ #include <linux/kconfig.h> #include <linux/instruction_pointer.h> #include <linux/hex.h> +#include <linux/wordpart.h> #include <asm/byteorder.h> #include <asm/cpufeature.h> diff --git a/sys/compat/linuxkpi/common/include/linux/wordpart.h b/sys/compat/linuxkpi/common/include/linux/wordpart.h new file mode 100644 index 000000000000..ce697bbef3b3 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/wordpart.h @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Jean-Sébastien Pédron + */ + +#ifndef _LINUXKPI_LINUX_WORDPART_H_ +#define _LINUXKPI_LINUX_WORDPART_H_ + +#define lower_32_bits(n) ((u32)(n)) +#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) + +#endif /* _LINUXKPI_LINUX_WORDPART_H_ */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f27b6b.18e8b.4e93d997>
