Re: git: 9820afb99e6f - main - LinuxKPI: introduce LINUXKPI_DEBUG to enable LinuxKPI debugging
- Reply: Bjoern A. Zeeb: "Re: git: 9820afb99e6f - main - LinuxKPI: introduce LINUXKPI_DEBUG to enable LinuxKPI debugging"
- In reply to: Bjoern A. Zeeb : "git: 9820afb99e6f - main - LinuxKPI: introduce LINUXKPI_DEBUG to enable LinuxKPI debugging"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 Oct 2026 15:18:03 UTC
Hello Bjoern,
I've just update my laptop world and poudriere jail to
main-n290042-9f0432041b8f: Sun Oct 11
and graphics/drm-612-kmod failed to build:
<snip>
--- dma-fence-array.o ---
In file included from
/wrkdirs/usr/ports/graphics/drm-612-kmod/work/drm-kmod-drm_v6.12.110_1/drivers/dma-buf/dma-fence-array.c:29:
In file included from
/wrkdirs/usr/ports/graphics/drm-612-kmod/work/drm-kmod-drm_v6.12.110_1/linuxkpi/bsd/include/linux/dma-fence-array.h:30:
In file included from
/wrkdirs/usr/ports/graphics/drm-612-kmod/work/drm-kmod-drm_v6.12.110_1/linuxkpi/bsd/include/linux/dma-fence.h:31:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/wait.h:36:
/usr/src/sys/compat/linuxkpi/common/include/linux/spinlock.h:32:10: fatal
error: 'opt_linuxkpi.h' file not found
32 | #include "opt_linuxkpi.h"
| ^~~~~~~~~~~~~~~~
--- dma-buf.o ---
In file included from
/wrkdirs/usr/ports/graphics/drm-612-kmod/work/drm-kmod-drm_v6.12.110_1/drivers/dma-buf/dma-buf.c:53:
In file included from
/wrkdirs/usr/ports/graphics/drm-612-kmod/work/drm-kmod-drm_v6.12.110_1/linuxkpi/gplv2/include/linux/dma-buf.h:29:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/file.h:39:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/fs.h:39:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/wait.h:36:
/usr/src/sys/compat/linuxkpi/common/include/linux/spinlock.h:32:10: fatal
error: 'opt_linuxkpi.h' file not found
32 | #include "opt_linuxkpi.h"
| ^~~~~~~~~~~~~~~~
<snip>
Thanks,
Bjoern A. Zeeb <bz@freebsd.org> escreveu (sábado, 10/10/2026 à(s) 19:29):
> The branch main has been updated by bz:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=9820afb99e6fdc471cb820f321530c52ed2c31ac
>
> commit 9820afb99e6fdc471cb820f321530c52ed2c31ac
> Author: Bjoern A. Zeeb <bz@FreeBSD.org>
> AuthorDate: 2025-11-25 17:17:55 +0000
> Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
> CommitDate: 2026-10-10 18:28:33 +0000
>
> LinuxKPI: introduce LINUXKPI_DEBUG to enable LinuxKPI debugging
>
> This allows us to build kernels which will (if the sysctl is enabled
> too) show pr_debug() and pr_devel() output.
>
> Enable it by default for debug kernels.
>
> This option can later also be used for other LinuxKPI parts, like
> skbuffs, netdevice, rcu, ... to conditionally compile in debugging
> support to further justify its existence beyond an in-code #define.
>
> Sponsored by: The FreeBSD Foundation
> MFC after: 3 days
> Reviewed by: dumbbell, emaste
> Differential Revision: https://reviews.freebsd.org/D54060
> ---
> sys/compat/linuxkpi/common/include/linux/kernel.h | 6 ++++--
> sys/conf/kmod.mk | 1 +
> sys/conf/options | 3 +++
> sys/conf/std.debug | 1 +
> sys/conf/std.nodebug | 1 +
> 5 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h
> b/sys/compat/linuxkpi/common/include/linux/kernel.h
> index 3fcc6c1a925e..43aea5985ab4 100644
> --- a/sys/compat/linuxkpi/common/include/linux/kernel.h
> +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h
> @@ -30,6 +30,8 @@
> #ifndef _LINUXKPI_LINUX_KERNEL_H_
> #define _LINUXKPI_LINUX_KERNEL_H_
>
> +#include "opt_linuxkpi.h"
> +
> #include <sys/types.h>
> #include <sys/systm.h>
> #include <sys/param.h>
> @@ -176,9 +178,9 @@ scnprintf(char *buf, size_t size, const char *fmt, ...)
>
> /*
> * The "pr_debug()" and "pr_devel()" macros should produce zero code
> - * unless DEBUG is defined:
> + * unless LINUXKPI_DEBUG is defined:
> */
> -#ifdef DEBUG
> +#ifdef LINUXKPI_DEBUG
> extern int linuxkpi_debug;
> #define pr_debug(fmt, ...) \
> do { \
> diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
> index c35116dfcaa8..c2081be0da5a 100644
> --- a/sys/conf/kmod.mk
> +++ b/sys/conf/kmod.mk
> @@ -103,6 +103,7 @@ LINUXKPI_GENSRCS+= \
> pci_iov_if.h \
> pcib_if.h \
> vnode_if.h \
> + opt_linuxkpi.h \
> opt_stack.h
>
> .if ${MK_USB} != "no"
> diff --git a/sys/conf/options b/sys/conf/options
> index c9d72fdfdbb3..d14fe964949e 100644
> --- a/sys/conf/options
> +++ b/sys/conf/options
> @@ -908,6 +908,9 @@ TDMA_TXRATE_QUARTER_DEFAULT opt_tdma.h
> TDMA_TXRATE_11NA_DEFAULT opt_tdma.h
> TDMA_TXRATE_11NG_DEFAULT opt_tdma.h
>
> +# LinuxKPI
> +LINUXKPI_DEBUG opt_linuxkpi.h
> +
> # VideoMode
> PICKMODE_DEBUG opt_videomode.h
>
> diff --git a/sys/conf/std.debug b/sys/conf/std.debug
> index 0149779b3e5c..4ec89de4b407 100644
> --- a/sys/conf/std.debug
> +++ b/sys/conf/std.debug
> @@ -17,3 +17,4 @@ options VERBOSE_SYSINIT=0 # Support
> debug.verbose_sysinit, off by default
> options ALT_BREAK_TO_DEBUGGER # Enter debugger on
> keyboard escape sequence
> options KDTRACE_MIB_SDT # Add SDT probes to
> network counters
> options TCP_HPTS_KTEST # Add KTEST support for HPTS
> +options LINUXKPI_DEBUG # Add LinuxKPI
> pr_debug/pr_devel support
> diff --git a/sys/conf/std.nodebug b/sys/conf/std.nodebug
> index f8c908cc9936..ac5d27cedd36 100644
> --- a/sys/conf/std.nodebug
> +++ b/sys/conf/std.nodebug
> @@ -17,6 +17,7 @@ nooptions MALLOC_DEBUG_MAXZONES
> nooptions QUEUE_MACRO_DEBUG_TRASH
> nooptions KDTRACE_MIB_SDT
> nooptions TCP_HPTS_KTEST
> +nooptions LINUXKPI_DEBUG
>
> # Net80211 debugging
> nooptions IEEE80211_DEBUG
>
>
--
Nuno Teixeira
FreeBSD UNIX: <eduardo@FreeBSD.org> Web: https://FreeBSD.org