git: c2cd285bfe41 - stable/13 - sys: Add a deprecation warning for 32-bit kernels.

From: John Baldwin <>
Date: Wed, 06 Sep 2023 21:56:49 UTC
The branch stable/13 has been updated by jhb:


commit c2cd285bfe41574490e5f2c11b113e5fb8536a55
Author:     John Baldwin <>
AuthorDate: 2023-08-16 16:48:51 +0000
Commit:     John Baldwin <>
CommitDate: 2023-09-06 21:56:10 +0000

    sys: Add a deprecation warning for 32-bit kernels.
    Per recent discussions on arch@ and at the BSDCan developer summit, we
    are considering removing support for 32-bit platforms (in some form)
    for 15.0 (at the earliest).  A final decision on what will ship in
    15.0 will be made closer to the release of 15.0.  However, we should
    communicate the potential deprecation in 14.0 to provide notice to
    This commit adds a warning during boot on 32-bit kernels that they are
    deprecated and may be removed in 15.0.  More details will be included
    in a followup commit to RELNOTES.
    Reviewed by:    brooks, imp, emaste
    Differential Revision:
    (cherry picked from commit 41582f28ddf7b42b713b270d41e8da80160b69a3)
 sys/kern/init_main.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 4a8dc8ac45f1..73d78ad16df3 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -386,6 +386,15 @@ SYSINIT(diagwarn2, SI_SUB_LAST, SI_ORDER_FIFTH,
     print_caddr_t, diag_warn);
+#if __SIZEOF_LONG__ == 4
+static char ilp32_warn[] =
+    "WARNING: 32-bit kernels are deprecated and may be removed in FreeBSD 15.0.\n";
+    print_caddr_t, ilp32_warn);
+    print_caddr_t, ilp32_warn);
 static int
 null_fetch_syscall_args(struct thread *td __unused)