From nobody Thu Sep 17 21:16:46 2026 X-Original-To: dev-commits-src-all@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 4hm7qL3Cxvz6s5FR for ; Thu, 17 Sep 2026 21:16:46 +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 4hm7qL1Q3Bz4sMW for ; Thu, 17 Sep 2026 21:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789679806; 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=Jmb8Yz9Svd05pu4i8oK0Y7a7W36aAQFdDy5aSEB9Rkg=; b=uftGgaymGfwe8/bvIfGLJoqYK7FvnxhmdTDS68ohGmiJcqnKPZB6sPAuYwWnAuMgj07FY3 CeTVcyL1ub+s/cfUqoXz9Wt8phDKIaQQx8/Jm1cpKse34Xd9rKSrARUglqXGWq5v2Z5cIw 8LosNX+BEiVFbT91P0YFwjzy/ucWdqv0p3o7yzit2qPU53XPUPuKR/cAGQVNRs2CajxVlg y+2UJa2GuEAQpmp7xC5ArT4Y1OlkeqraAJVev2K1Evjw2gdnCSYU6xLvg8UmMqz6EA+x7z uWWDqYk4pWF5FCpDLAXs7e2aI0LZxZWPhH242NugzQ99x3kEqXrFHhTqCeRLOQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789679806; b=JIJRiInZm6viyM9qh6wVD/wdVCQFWvRP27SHolod06YKguHsp55kNVzvwE7esP4BHO0aVb CfEyj39tDk5UlWNlWmtjOjrEaSr7a4mmTYXN6FLkTnQ63iq2cmOnvJRPNL/UqM4CiqBwj6 kUlZNoW66waxgOwhqp2uSsOcSYYMuhMqvwpCSw3Il9x3V8J6zFygGB7IkcXgCToOCTc4h9 0QEJI1tZi1WUdTcMWPHAqJZ4jfE6BYLEIvlqQryiq6ImP3dmbMQ/pIf4/TmZy2O3weEEdE pfhRUEZ5O3YeqxGZGMTDBH03HPhZh2pnP6/4+tVRD1utVJpUy1IBlU7wkfP48g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789679806; 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=Jmb8Yz9Svd05pu4i8oK0Y7a7W36aAQFdDy5aSEB9Rkg=; b=Pg3azuQPvJXeqIW6CySXjtv6Yqi+vH8qMw802D777ErLeEgW8p2eR7qkIW4WCAz0QzzVxF 9kfqKxT48aXA+HUWIgBztQqoNMCpfi5Nxnyhe5sILW+vuQFOItFmwSxKq5+OvmR15klbtp txkQ+LU3+YurPfaMi480FKnboGs8z2CChNrR4aP5wNidfunqcGFbHp6kAVoGG27d4f2eas zEfpDO4lHCZU8cSgBDFWOtUltGLbRvvSqg/m7ouAUi4UpPzd0XVnCzJIznNR3YrfbkSOak 0MGoylC4fizz2ir6Zh57EbAmxYMeS10zD/Euiv9LUyNoWJsSRHZDElLbs8OSlg== 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 4hm7qL0TvbzqVM for ; Thu, 17 Sep 2026 21:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45d93 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 17 Sep 2026 21:16:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 9d18e2c12629 - main - LinuxKPI: remove timer KPI from Linux version before 4.15 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9d18e2c12629eba4229564a17c1fa3adf15bb5ac Auto-Submitted: auto-generated Date: Thu, 17 Sep 2026 21:16:46 +0000 Message-Id: <6aac58be.45d93.6d850c74@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9d18e2c12629eba4229564a17c1fa3adf15bb5ac commit 9d18e2c12629eba4229564a17c1fa3adf15bb5ac Author: Bjoern A. Zeeb AuthorDate: 2026-09-15 00:32:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-09-17 21:16:17 +0000 LinuxKPI: remove timer KPI from Linux version before 4.15 Now that semi-native drivers in main are clean of using any pre-4.15 Linux timer KPI, remove the macros from LinuxKPI as well. Supported versions of drm-kmod and the oldest nvidia port seem fine based on my checks. If anything else surfaces we can deal with the fallout; the changes to the newer KPI were mechanical in Linux and can be applied easily. This change can be detected by #if !defined(init_timer) at compile time so no need for a __FreeBSD_version bump. MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D59688 --- sys/compat/linuxkpi/common/include/linux/timer.h | 26 ++---------------------- sys/compat/linuxkpi/common/src/linux_compat.c | 2 +- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/timer.h b/sys/compat/linuxkpi/common/include/linux/timer.h index d48939e28a02..83b308c81b67 100644 --- a/sys/compat/linuxkpi/common/include/linux/timer.h +++ b/sys/compat/linuxkpi/common/include/linux/timer.h @@ -37,11 +37,7 @@ struct timer_list { struct callout callout; - union { - void (*function) (unsigned long); /* < v4.15 */ - void (*function_415) (struct timer_list *); - }; - unsigned long data; + void (*function) (struct timer_list *); unsigned long expires; }; @@ -59,26 +55,8 @@ extern unsigned long linux_timer_hz_mask; #define timer_setup(timer, func, flags) do { \ CTASSERT(((flags) & ~TIMER_IRQSAFE) == 0); \ - (timer)->function_415 = (func); \ - (timer)->data = (unsigned long)(timer); \ - callout_init(&(timer)->callout, 1); \ -} while (0) - -#define setup_timer(timer, func, dat) do { \ (timer)->function = (func); \ - (timer)->data = (dat); \ - callout_init(&(timer)->callout, 1); \ -} while (0) - -#define __setup_timer(timer, func, dat, flags) do { \ - CTASSERT(((flags) & ~TIMER_IRQSAFE) == 0); \ - setup_timer(timer, func, dat); \ -} while (0) - -#define init_timer(timer) do { \ - (timer)->function = NULL; \ - (timer)->data = 0; \ - callout_init(&(timer)->callout, 1); \ + callout_init(&(timer)->callout, 1); \ } while (0) extern int mod_timer(struct timer_list *, unsigned long); diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 84f95b3ec317..24655eb0341d 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2147,7 +2147,7 @@ linux_timer_callback_wrapper(void *context) return; } - timer->function(timer->data); + timer->function(timer); } static int