From nobody Mon Sep 15 21:17:58 2025 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 4cQdDS5Mb2z684Rr for ; Mon, 15 Sep 2025 21:18:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQdDS3G4tz3L3f for ; Mon, 15 Sep 2025 21:18:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-25669596955so48442715ad.0 for ; Mon, 15 Sep 2025 14:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1757971090; x=1758575890; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4RG3e6qX6+ru5ufRMZdFJFc3A8SB9vobUnyGRuygRLI=; b=qi/6ljuf2noFE24USGIvLSXeC5TUCriPUiw6p1GvONN8NbjsbkW8yZ2nAvitsv1vIy wUkTYc6YSMCdAYY3o8qmP+MVgN9tICo8Ojc8Roa8lC9xCC3FNzLwZS9vbYt+vbP0dDqX YmmMavSouaUA8fxuG+UfNEp7zi9MUK0Hl74omyMZiU2KHL4GuIa1JJ/x9Pf37+uoyvtj JXkdC8pvwsr5PUpGJJmsWsVQVnfZ2F7oOOoj2bnBg8fQ65z6oLqAPem3ylbQ6j8KQbnT H6FbRr+JEgXxRQEllZEAdhqKAQEoaaW2H8gOEsBwCFPeq2TXHUust2RGLhbXwHX8il/S z0xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757971090; x=1758575890; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4RG3e6qX6+ru5ufRMZdFJFc3A8SB9vobUnyGRuygRLI=; b=nKuNC8XQ/JBpM2jqP1rF9edGHwq0nkn+e8Wfk5iN9DHW96EXHPs3bAr7AcPLhIxMic xLlIKm1n0vcWie/oufRpoBoRbROwHb3GkdFpbbs/vqGxqAuPbk13Q+6MilDgBcX3iVBN qJQqzb3hIrIdowGG58Bj0gY5xEs3K+2ZSl3Nj/PqKt/G1ZJGtBFNWWFypw/ssofIVALz 6DogNg0yUUO55uNnKo96cdwrq06tzMkL3WWe4hDHVreoBehOu6pWAEYPrMW/NM++hp/D FleHAONMI0frOiw4wQTnIa+9EvF0I5gfhiM8ITiLcd1aMqko4XSjGixeIzNESV1QpNxf SPHA== X-Forwarded-Encrypted: i=1; AJvYcCVDgM48d8WU7tnv0R2T7aw/COkU1d3O5dCsVWontx3lJVMFzeaaIksSUwpDj4lq3FN3NYoYeLj+W4SAADg1ljGTnXze9Q==@freebsd.org X-Gm-Message-State: AOJu0YzV6pVjWeet/HwELkA/RIWzCOuHtRp3fc609wez+JMN1BWSEqzA IXuq5MaVFSUQvcDFqFVdgGgC6Y9oyqiAA9U8Jv3GFI3jl1MQdLRlSpAHOFeFBYqdqP73wrN+Gki rDG6nGQakOIzYhF54Cf8jj2jOjdrZTGHvtZitmxNJsg== X-Gm-Gg: ASbGncs7ELcOOX6qGsQor/lJosl86Ar5/vXuArSm6vNsbEYP1B+STnMUMjwDRPv6gBu G+JwDCOuN+p7/CqlXeSDwdUQTflkCt+FfIKB10+OQPahWFvYKndk/3zMLhDYwk2Ysg8hLIEKBcP WKCm/2T7Wq2VcIeI7eo0zwxDunszFk863u+3//HH8TbZr5lXsIS8oS8emuLx4GnmQVBLEybg29Y /gR32/kSs5du3Kn0sfm26izXUDEDWJ/6ohFnVmA2IbsGuwQRm6OEy1xUw2GcYxJISQ95tOPTXx3 4Yy7 X-Google-Smtp-Source: AGHT+IEVqSQmFROgkN+Z+iKrolE9z874vUzYWiKirlYe8gp1cnr2Er8RpI7tEgnYt7hS99jX0XWaysR/db6F8GUaqfM= X-Received: by 2002:a17:903:24c:b0:250:bd52:4cdb with SMTP id d9443c01a7336-25d27624318mr141391255ad.32.1757971089883; Mon, 15 Sep 2025 14:18:09 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509150304.58F34BWJ035102@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 15 Sep 2025 15:17:58 -0600 X-Gm-Features: Ac12FXwInvHoJAxFJZuHS318Rs6CgAVefGNHJhJA6xVfuJP5O4nGo_za49LzGCA Message-ID: Subject: Re: git: 5e0a4859f28a - main - iwlwifi: Don't compile for gcc before 14 To: "Bjoern A. Zeeb" Cc: Warner Losh , =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000569709063edd8a31" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cQdDS3G4tz3L3f --000000000000569709063edd8a31 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 15, 2025, 1:26=E2=80=AFPM Bjoern A. Zeeb wrote= : > On Mon, 15 Sep 2025, Warner Losh wrote: > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D5e0a4859f28ad4869f7a73faf42debc= 355a370bf > > > > commit 5e0a4859f28ad4869f7a73faf42debc355a370bf > > Author: Warner Losh > > AuthorDate: 2025-09-14 18:03:16 +0000 > > Commit: Warner Losh > > CommitDate: 2025-09-15 03:03:45 +0000 > > > > iwlwifi: Don't compile for gcc before 14 > > > > gcc 13 and earlier don't have __builtin_bitcountg. The linux wifi kp= i > > uses this unconditionally. While in this one use, it might not be > > needed, I opted to not compile iwlwifi when building gcc12 or 13 > rather > > than risk breaking it for everbody else. > > > > With this change gcc12 builds the kernel. Maybe this will stop jenki= ns > > email for every commit I make. > > > > Sponsored by: Netflix > > --- > > sys/modules/Makefile | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/sys/modules/Makefile b/sys/modules/Makefile > > index 5315d518afd8..f9fdbca78869 100644 > > --- a/sys/modules/Makefile > > +++ b/sys/modules/Makefile > > @@ -576,7 +576,10 @@ _mlx5ib=3D mlx5ib > > ${MACHINE_CPUARCH} =3D=3D "i386" > > _ena=3D ena > > _gve=3D gve > > +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation > > (a) I beleive there is no __builtin_bitcountg but you mean > __builtin_popcountg > both here and in the commit message. > Yes. (b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for DRM > > (c) There is no direct use in any LinuxKPI based wireless driver: > % grep -r __builtin_popcountg sys/contrib/dev > % > > (4) iwlwifi only uses HWEIGHT32, which was changed by the aforementioned > commit > in LinuxKPI. > Yes. I noticed all that. Didn't see a trivial way to fix it right. (5) Please do it right and in the place where it is actually defined to be > used, > in LinuxKPI, and not here as it can be easily fixed there with an > #ifdef or > otherwise as there were alternatives on the review if I remember > correctly. > Knock yourselves out. I was tired of the CI jobs whining and this was the easiest way to make that stop. I've got too many things on my plate to refine this more. If you want to support older gcc for this driver, that's up to you. The ci jobs have been failing for weeks if not longer I am Cc:ing dumbbell as well as he needed the change for DRM. > > PS: we also need to fix this in sys/sys at some point and save us some > trouble. > What's to fix? Creating the Generic wrapper around builtin_popcount? Warner > > +.if !(${COMPILER_TYPE} =3D=3D "gcc" && ${COMPILER_VERSION} < 140000) > > _iwlwifi=3D iwlwifi > > +.endif > > _rtw88=3D rtw88 > > _rtw89=3D rtw89 > > _vmware=3D vmware > > > > -- > Bjoern A. Zeeb r15:7 > --000000000000569709063edd8a31 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Sep 15, 2025, 1:26=E2=80= =AFPM Bjoern A. Zeeb <bz@freebsd.org> wrote:
On Mon, 15 Sep 2025, = Warner Losh wrote:

> The branch main has been updated by imp:
>
> URL:
https://cgit.FreeBSD.org/src/commit/?id=3D5e0a4859f28ad4869f7a73faf42deb= c355a370bf
>
> commit 5e0a4859f28ad4869f7a73faf42debc355a370bf
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2025-09-14 18:03:16 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2025-09-15 03:03:45 +0000
>
>=C2=A0 =C2=A0 iwlwifi: Don't compile for gcc before 14
>
>=C2=A0 =C2=A0 gcc 13 and earlier don't have __builtin_bitcountg. Th= e linux wifi kpi
>=C2=A0 =C2=A0 uses this unconditionally. While in this one use, it migh= t not be
>=C2=A0 =C2=A0 needed, I opted to not compile iwlwifi when building gcc1= 2 or 13 rather
>=C2=A0 =C2=A0 than risk breaking it for everbody else.
>
>=C2=A0 =C2=A0 With this change gcc12 builds the kernel. Maybe this will= stop jenkins
>=C2=A0 =C2=A0 email for every commit I make.
>
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix
> ---
> sys/modules/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/sys/modules/Makefile b/sys/modules/Makefile
> index 5315d518afd8..f9fdbca78869 100644
> --- a/sys/modules/Makefile
> +++ b/sys/modules/Makefile
> @@ -576,7 +576,10 @@ _mlx5ib=3D mlx5ib
>=C2=A0 =C2=A0 =C2=A0${MACHINE_CPUARCH} =3D=3D "i386"
> _ena=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ena
> _gve=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gve
> +# gcc13 and earlier lack __builtin_bitcountg used by linux emulation<= br>
(a) I beleive there is no __builtin_bitcountg but you mean __builtin_popcou= ntg
both here and in the commit message.

Yes.

(b) That was introduced in 7cbc4d875971860d941cc15d7f42e6cfeffbfe66 for DRM=

(c) There is no direct use in any LinuxKPI based wireless driver:
% grep -r __builtin_popcountg sys/contrib/dev
%

(4) iwlwifi only uses HWEIGHT32, which was changed by the aforementioned co= mmit
=C2=A0 =C2=A0 =C2=A0in LinuxKPI.

Yes. I noticed all that. Didn't see a t= rivial way to fix it right.

(5) Please do it right and in the place where it is actually defined to be = used,
=C2=A0 =C2=A0 =C2=A0in LinuxKPI, and not here as it can be easily fixed the= re with an #ifdef or
=C2=A0 =C2=A0 =C2=A0otherwise as there were alternatives on the review if I= remember correctly.

Knock yourselves out. I was tired of the CI jobs whinin= g and this was the easiest way to make that stop. I've got too many thi= ngs on my plate to refine this more. If you want to support older gcc for t= his driver, that's up to you. The ci jobs have been failing for weeks i= f not longer

I am Cc:ing dumbbell as well as he needed the change for DRM.

PS: we also need to fix this in sys/sys at some point and save us some
trouble.

What's to fix? Creating the Generic wrapper around builtin_po= pcount?

Warner


> +.if !(${COMPILER_TYPE} =3D=3D "gcc" && ${COMPILER_V= ERSION} < 140000)
> _iwlwifi=3D=C2=A0 =C2=A0 =C2=A0iwlwifi
> +.endif
> _rtw88=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rtw88<= br> > _rtw89=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rtw89<= br> > _vmware=3D=C2=A0 =C2=A0 =C2=A0 vmware
>

--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7
--000000000000569709063edd8a31--