From nobody Sat Oct 10 18:29:03 2026 X-Original-To: dev-commits-src-main@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 4j2C1C5FkJz6vdKm for ; Sat, 10 Oct 2026 18:29:03 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4j2C1C3STYz4nBp for ; Sat, 10 Oct 2026 18:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791656943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/+GxdvUzPjtBfbgyrKUjEJ/18MSye4I3YpoCcoRYgdQ=; b=K9uoMUNDvGKaAZaDgjWoChuZIWssqOiKw8Uhs631xJSiwrKpFP3yhdGzuH0YtG6qtr2YqN 8wEY7LdamK+XCj+fC64zuT8CXiv4/SltuIGyoX8sZOfSiXx+53w0hmBY/rpg/dGrjFllEA LTEkgxYDseAc6A6+Y6RFM/498Utk5gHIW9lSTJTOC/AYQmAxtUHnX0MB4HfDEbsPtdfbqM t2dbXAOfFrnVsBV3P+kIUZGplyPA+/a/RF8n3n9VKeUTtL4ckEjVUiQ+7G13rkwkJaZgW9 ldQu7HiJvuy/oHxPU2/mglxYLWopoqfmnZr0Ny3zIiZaO9wE38tIiSe89gySDw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791656943; b=NVwhUxoSgu8CWy1RCdXghppLVlwB4Q2O0ypT9/jg7M+eN6JFJ8qP+1ua0K561lP8zQCQm6 jYoBKlj0KGBLi4d9fm4NOjPAIwEa1ItgEj7BmHIvJmeGZFXcho7pz2h8deehFxc7YoB6Y3 cQ1uWeKMWgeg8ZqrXu2mjXseO/VGbNB7Bq8XpCK9VuAQvVg+nWsFZeH/kKhZJt4qOHQkDB HRZwYdRkMPmPI+Fvaq1rLQdZKe6GnwMWhj7D+D0Jg55/HkZcbNPsu9Ra8ZIJvOq9DRzrjD fla9R1J7HMeobrChQ7ITqbngXlgsIcs86mqd+EJK3BQs550QBt9CPfDn+uUsdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791656943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/+GxdvUzPjtBfbgyrKUjEJ/18MSye4I3YpoCcoRYgdQ=; b=RDOporvOod6ULaiPxIXl9hrrv7Ux3aXSMv50ggOsEHig+12he0YXFdnGJnV/uTiG4qq7df SJ/WJy5UBi+NVDqCKRj63HJ1awDmyH4v1LoNEhE7vWtwTDEGdMUmue8AfIi5I3j7teqebK 7QGa/q6mw5xRkwa3u5UdVVxtd2DOm7TgTOrJOzGCGYpy19spzKoXI+GfeGPewPhkvoPmSE 3K5NSOfzGmF0E82mNbjjEB+w6pgdtvGaHjjCvF2Dv68MVAqhyYrAuyoR2IAnBRtACiNGDC b8aTPXEMeJtKudu2talM7U4orP2lxcHrtYQQyuDafkkahPZ7C47D2Xmz+iLJkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4j2C1C1XPmz15hc for ; Sat, 10 Oct 2026 18:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2233a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Oct 2026 18:29:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 9820afb99e6f - main - LinuxKPI: introduce LINUXKPI_DEBUG to enable LinuxKPI debugging List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: 9820afb99e6fdc471cb820f321530c52ed2c31ac Auto-Submitted: auto-generated Date: Sat, 10 Oct 2026 18:29:03 +0000 Message-Id: <6aca83ef.2233a.71da542a@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9820afb99e6fdc471cb820f321530c52ed2c31ac commit 9820afb99e6fdc471cb820f321530c52ed2c31ac Author: Bjoern A. Zeeb AuthorDate: 2025-11-25 17:17:55 +0000 Commit: Bjoern A. Zeeb 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 #include #include @@ -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