From nobody Mon Sep 15 21:17:58 2025 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 4cQdDY3lwqz684Jv for ; Mon, 15 Sep 2025 21:18:21 +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 4cQdDY0qy8z3L1k for ; Mon, 15 Sep 2025 21:18:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2616549b925so21358485ad.1 for ; Mon, 15 Sep 2025 14:18:21 -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=rTFr4igogC2yE3SAZ969c5ydtBGkB7Pdhpgj5HCj4n9Zqeu3a59970Q3a4DTtLDS50 fYJ8ssguLYs3YCvYfC1JOL4aSnnHAiRMIfR2pXtJprBbRtBuh8oXm9DCMn+qqCGwM5lP M8nRdpIlxhPdgfWksD+2sei8yfkq2EHgvcq0vAj+d6ZKiz0XqcfkaoGzBEWG39z+h6gC eJTm6rpK4t+WgYZuGsLwXSDjKUDrzIs37aX1/DFuKXYHV61BIA5vTLbU8DdJ5tHF7Lks 5e0HZZTNSpoWpLyhSki4dE6O79G0erEfthZyLPK9LS+2WCZwad/Qym/8xW3GnAqKV7aY fJ/w== X-Forwarded-Encrypted: i=1; AJvYcCWLrtSh4EjLpmw+Q9HPmrWORPXDuKB+YyeJ9mTDY+A1PoC+M7+qK1Pp5/QoiuDp+7YN4pxlLWCY6G7b+v0ZqK7XbPNZ@freebsd.org X-Gm-Message-State: AOJu0YxTXdJvHNU/4AKyM4o1ofQSUVFKwom44xd3DFPIRyNml8b5WWud IknZDwbpJVT19GvaEtV1fHaQPD8YdRritxOrLTTMjYhJFP857CMy6Z47ublpZCngeXGNexwsuqK kT35xfVjO1M5R/TXKRImMx3oxjNcYUrQfExeH8mJ7b2p68loabADl1eY= X-Gm-Gg: ASbGncuOYf4Yp2Bzfd7A9XyeluE8v1qdyxA0s9Kya2XGAllHLh2mczpnlFtsAx1sc3X vWxRy+bGErMAZIifhtcT3m1pAyPROv7bW0XtEdKcJ4LIYkudV4gu/jKVopC81H7S0Fih4urzVy0 rbZvPaZdTt8Q2mJVacaTrLtUfzc6FbsvGZRFrpFKF9ckMfubPDClO01Q3OM5AiMaPDMwaqlkLcA s6Y2h/k0/6GB4Qsq6CWHHpZj/Fm/WK3MmwTDxfEDZKKrN5FPUd3B+wKBk1I0Z4+zJHz/OvUAYJC F0JN 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 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 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: 4cQdDY0qy8z3L1k --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--