From nobody Wed Apr 22 21:08:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdf61G0z6bKtW for ; Wed, 22 Apr 2026 21:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1Bdd6SbKz3kWY for ; Wed, 22 Apr 2026 21:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yULcUq88emwS+cd6SXXeHAXJXsT2TGHf/eOdLfAXo5U=; b=tEgq6tMgOdiPaRwjU+mpPVSCltz8LW5zIX4Nec9oYOn5etbMR2+HaDVgUTcvXcS60TnatE 0JHE5UZy/oGP4FU9bC74Tk7JCKpYaIXZxNpDDRmt20Zc72OTEZr6rmguezebpP+CVj26bo yLhYzGcpJWyHZVrPOwE18Ddgj0s1Y8WlexEoWzbVNacuG5Q1rZ5Q24I8tPHJaJgKABefGT LM+FuGyJPSDzD4ICqkxa9h/9HTVtm6OMqp0z4EYeF5UPEGfdm1jHRbY41sGBPiYKOd1R17 MjNzKcMuzi0j2RuQp3WTSLQP3nSlRwC7zzgWeEERCb2GSKpyK+Zv2F1qTwdDKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776892085; a=rsa-sha256; cv=none; b=EGsJSJ056Q/kq4hPrlE9ZC+LXceyZeLw5c9KYM2cwERnQKXKA5hpkiXt0NEJkhxF6IJcJk 7ML4F3QMqs6mKTxTgt+PrSTfmWLiWdKbQ1/4LBXCaW1dqWQTWSqAJ+zo1UONA0LmGooQBX XRtP9FNP+o7SnsxFzjs6VV+C2+8ugMmMPRhtO+ml+UfDUdkmajQeJXxGdK/NxbGeBwqqiA M99VkeCtInb4vTQAhhYsEkVQ5sk6QHlLmHnAU6MpdHhT3/xDrJAXOj+iZ4MhxhNIFwwzu2 fpsHZ0aTWkzfqCJOh8lrIMwUz9hemiPp2h8OmH2Tk+VRqvYiha9ZNtBbqPUxew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776892085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yULcUq88emwS+cd6SXXeHAXJXsT2TGHf/eOdLfAXo5U=; b=nh8mCH86tvTWDtmU6NnuZsekvcWSncZmoW9d3zrkGpHV37xmyrBU9EEo000aWF96oTesZ/ cTkfhKzYx/qyR1d20d7rITYUn/TrECtViLbwAcbrBZ17EJi1vKWBGO+3lgGBd3G0hbRqt7 MIA4jLKI4+OwT5KyuQKF0yyPlB4ipYDIv42R82g0aAngl7xD3roCMwspYCffnRLwRCOLzu VAkOsgmAs/2jqVs1b2BULeeyqRWGaPnet3dHYKap7xYvhtGPaB2dn3O7fUxLMo1k6xcWPk qO6H7jL8w0xCB1Qzq4ZcfOXLVN80LTKsZogmdS0gK5jNLe6Wv3+3H78NgNCvgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1Bdd5ZgYzn9L for ; Wed, 22 Apr 2026 21:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3008c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 21:08:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Bjoern A. Zeeb Subject: git: 34c13c5ee2b1 - stable/15 - linuxkpi: Split List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 34c13c5ee2b15b928fd9125784c969553a64e390 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 21:08:05 +0000 Message-Id: <69e938b5.3008c.45ca0cef@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=34c13c5ee2b15b928fd9125784c969553a64e390 commit 34c13c5ee2b15b928fd9125784c969553a64e390 Author: Jean-Sébastien Pédron AuthorDate: 2025-08-17 11:10:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-04-22 20:56:53 +0000 linuxkpi: Split On Linux, they split the content into three headers: 1. 2. 3. The first includes the second, which includes the third. is also included on the compiler command line by default! I added that to the compilation flags of the DRM drivers. This allowed me to drop at least one: #ifdef __FreeBSD #include #endif Note that our copy of contains definitions which are not defined by Linux' . I left them alone. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54495 (cherry picked from commit 33fa585a0e9032b31c563c8aae001c0c2a4866d4) --- .../linuxkpi/common/include/linux/compiler.h | 48 +-------------------- .../common/include/linux/compiler_attributes.h | 49 ++++++++++++++++++++++ .../linuxkpi/common/include/linux/compiler_types.h | 45 ++++++++++++++++++++ 3 files changed, 96 insertions(+), 46 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 4146c829b936..90d907dd4d45 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -33,48 +33,18 @@ #include #include -#define __user -#define __kernel -#define __safe -#define __force -#define __nocast -#define __iomem -#define __chk_user_ptr(x) ((void)0) -#define __chk_io_ptr(x) ((void)0) -#define __builtin_warning(x, y...) (1) -#define __acquires(x) -#define __releases(x) -#define __acquire(x) do { } while (0) -#define __release(x) do { } while (0) -#define __cond_lock(x,c) (c) +#include + #define __bitwise #define __devinitdata -#ifndef __deprecated -#define __deprecated -#endif #define __init #define __initconst #define __devinit #define __devexit #define __exit -#define __rcu -#define __percpu -#define __weak __weak_symbol -#define __malloc -#define __attribute_const__ __attribute__((__const__)) -#undef __always_inline -#define __always_inline inline -#define noinline __noinline -#define noinline_for_stack __noinline #define ____cacheline_aligned __aligned(CACHE_LINE_SIZE) #define ____cacheline_aligned_in_smp __aligned(CACHE_LINE_SIZE) -#define fallthrough /* FALLTHROUGH */ do { } while(0) -#if __has_attribute(__nonstring__) -#define __nonstring __attribute__((__nonstring__)) -#else -#define __nonstring -#endif #if __has_attribute(__counted_by__) #define __counted_by(_x) __attribute__((__counted_by__(_x))) #else @@ -93,24 +63,12 @@ #define typeof(x) __typeof(x) #define uninitialized_var(x) x = x -#define __maybe_unused __unused -#define __always_unused __unused -#define __must_check __result_use_check - -#define __printf(a,b) __printflike(a,b) - -#define __diag_push() -#define __diag_pop() -#define __diag_ignore_all(...) #define barrier() __asm__ __volatile__("": : :"memory") #define lower_32_bits(n) ((u32)(n)) #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) -#define ___PASTE(a,b) a##b -#define __PASTE(a,b) ___PASTE(a,b) - #define WRITE_ONCE(x,v) do { \ barrier(); \ (*(volatile __typeof(x) *)(uintptr_t)&(x)) = (v); \ @@ -129,8 +87,6 @@ #define lockless_dereference(p) READ_ONCE(p) #define _AT(T,X) ((T)(X)) - -#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) #define __must_be_array(a) __same_type(a, &(a)[0]) #define sizeof_field(_s, _m) sizeof(((_s *)0)->_m) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h b/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h new file mode 100644 index 000000000000..42908bb6c2b5 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h @@ -0,0 +1,49 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot + * All rights reserved. + */ + +#ifndef _LINUXKPI_LINUX_COMPILER_ATTRIBUTES_H_ +#define _LINUXKPI_LINUX_COMPILER_ATTRIBUTES_H_ + +#include + +#define __attribute_const__ __attribute__((__const__)) + +#ifndef __deprecated +#define __deprecated +#endif + +#define fallthrough /* FALLTHROUGH */ do { } while(0) + +#undef __always_inline +#define __always_inline inline + +#define __printf(a,b) __printflike(a,b) + +#define __malloc + +#define noinline __noinline + +#if __has_attribute(__nonstring__) +#define __nonstring __attribute__((__nonstring__)) +#else +#define __nonstring +#endif + +#define noinline_for_stack __noinline + +#define __maybe_unused __unused +#define __always_unused __unused + +#define __must_check __result_use_check + +#define __weak __weak_symbol + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/compiler_types.h b/sys/compat/linuxkpi/common/include/linux/compiler_types.h new file mode 100644 index 000000000000..7151c03de690 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/compiler_types.h @@ -0,0 +1,45 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013-2016 Mellanox Technologies, Ltd. + * Copyright (c) 2015 François Tigeot + * All rights reserved. + */ + +#ifndef _LINUXKPI_LINUX_COMPILER_TYPES_H_ +#define _LINUXKPI_LINUX_COMPILER_TYPES_H_ + +#include + +#include + +#define __kernel +#define __user +#define __iomem +#define __percpu +#define __rcu +#define __chk_user_ptr(x) ((void)0) +#define __chk_io_ptr(x) ((void)0) +#define __acquires(x) +#define __releases(x) +#define __acquire(x) do { } while (0) +#define __release(x) do { } while (0) +#define __cond_lock(x,c) (c) +#define __force +#define __nocast +#define __safe +#define __builtin_warning(x, y...) (1) + +#define ___PASTE(a,b) a##b +#define __PASTE(a,b) ___PASTE(a,b) + +#define __diag_push() +#define __diag_pop() +#define __diag_ignore_all(...) + +#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) + +#endif