From nobody Sat Nov 05 04:54:58 2022 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 4N44tS00kZz4gj5j for ; Sat, 5 Nov 2022 04:55:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N44tR0mzTz3lj6 for ; Sat, 5 Nov 2022 04:55:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ej1-x62b.google.com with SMTP id d26so17961729eje.10 for ; Fri, 04 Nov 2022 21:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2i6Ex0bT8F38ju6WaGASJiparORrL1jnNGiXPvpxi/8=; b=LpEVAE5TVj7i/Lnh3ZiUcGuJ4jfBzvpdlgDGLRAIGGkj7ebHWKuRVPjELHGilDjG1h ofFlFT2xwgnVFto0B6wecvS+BpbJvPbabnar2JX1Y7YpaebISwsUx70xpIzUuxc0TyNT 0H7eYmN2mXE+AfZ3N/roCdZ0o4gh8CHXoCTInZWic4gg/BK9Et1wC557+qYzXcwN+cPl Fkca5MlMCN0xA6hFars8wF5EkybKpGVgqQqL8/Xw6jiD/SJ5p8A1apyOLZhLniBWW/Cg QfMiEa9B0HkN9ZDcdP3yhbnqFtgqkmgfO3YDfCiVfhBK4Dh4jWZFHN7QL8LZrmBjRCAP XaOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=2i6Ex0bT8F38ju6WaGASJiparORrL1jnNGiXPvpxi/8=; b=6s5toFoYVwY8kq1VOzzio+UbDAKNC/qlcY6oKZLeYmxpY/dB5/BMm5XntrakayRSRs S999L6yUQobN8kP3kiJH63RL1A2tB2L0P/c2/CjJekl0tYN8SBSy1wPZPkO6FZwphfMN t9yaRvP0Wc8zD3MPB3m4aCB1WOE5sAORocFLRCg62+mg90qrKFwVpB758tOylw40gOpm ykdgPkL8Y36PfH8hu/DzKbXP+EG7W8TiBAUllp6gUyQK4bW2mIyjfduNYEntbahqwaAY j0mkv0rKNr0/ntM2/2U4iVhiccl1eYueuX7x9x7GN64W0IGqhnQgXRJR2Gf6VZguTiIm M8jw== X-Gm-Message-State: ACrzQf0rj22TtHN23TWRvvAqUJU65syB6lp8lNtTIsEP6iZRVK73divC ciktijdtPW+TKc+txjYhoqteb/mebnB1P5v+x754Cg== X-Google-Smtp-Source: AMsMyM5z0PmRRk7Z9B/XUFchAnpI6G7ogiZa2YHjxta29juvwBHtzuaVi1wvT1d1f/+Pk9eNdYFAbfGH0BGZu18gNmc= X-Received: by 2002:a17:907:2710:b0:7ad:86f9:9bad with SMTP id w16-20020a170907271000b007ad86f99badmr38433570ejk.32.1667624109696; Fri, 04 Nov 2022 21:55: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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202211042255.2A4Mtxr8032843@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 4 Nov 2022 22:54:58 -0600 Message-ID: Subject: Re: git: 75217c2b4700 - main - bnxt: Only build on 64-bit platforms To: Kyle Evans Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000ad7e7105ecb1fe66" X-Rspamd-Queue-Id: 4N44tR0mzTz3lj6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=LpEVAE5T; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::62b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62b:from]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --000000000000ad7e7105ecb1fe66 Content-Type: text/plain; charset="UTF-8" On Fri, Nov 4, 2022 at 8:45 PM Kyle Evans wrote: > On Fri, Nov 4, 2022 at 5:56 PM Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=75217c2b4700a1954971b1ec3722c39dd934e287 > > > > commit 75217c2b4700a1954971b1ec3722c39dd934e287 > > Author: Warner Losh > > AuthorDate: 2022-11-04 22:49:10 +0000 > > Commit: Warner Losh > > CommitDate: 2022-11-04 22:49:10 +0000 > > > > bnxt: Only build on 64-bit platforms > > > > The driver uses bus_space_read_8 and friends, which do not exist on > > 32-bit i386 and break the build. > > > > Sponsored by: Netflix > > --- > > sys/modules/Makefile | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/sys/modules/Makefile b/sys/modules/Makefile > > index 3a009f071cab..091fa7543164 100644 > > --- a/sys/modules/Makefile > > +++ b/sys/modules/Makefile > [ ... skip ...] > > @@ -424,6 +424,12 @@ SUBDIR+= dtrace > > SUBDIR+= opensolaris > > .endif > > > > +# Requires bus_space_read_8 > > +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "aarch64" || \ > > + ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == > "powerpc64le" > > +_bnxt= bnxt > > +.endif > > + > > .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) > > .if exists(${SRCTOP}/sys/opencrypto) > > _crypto= crypto > > It looks like i386 really is the outlier here, any reason not to do > this instead? (minor build fix for 32-bit platforms included, I > test-built armv6, armv7, powerpc) > > diff --git a/sys/dev/bnxt/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_hwrm.c > index c362e01a1f8b..28e4ef7201ff 100644 > --- a/sys/dev/bnxt/bnxt_hwrm.c > +++ b/sys/dev/bnxt/bnxt_hwrm.c > @@ -1483,7 +1483,7 @@ bnxt_hwrm_l2_filter_alloc(struct bnxt_softc > *softc, uint16_t vlan_tag, > > if (*filter_id != -1) { > device_printf(softc->dev, "Attempt to re-allocate l2 ctx " > - "filter (fid: 0x%lx)\n", *filter_id); > + "filter (fid: 0x%jx)\n", > (uintmax_t)*filter_id); > return EDOOFUS; > } > > diff --git a/sys/modules/Makefile b/sys/modules/Makefile > index 091fa7543164..bd55beb316fc 100644 > --- a/sys/modules/Makefile > +++ b/sys/modules/Makefile > @@ -425,8 +425,7 @@ SUBDIR+= opensolaris > .endif > > # Requires bus_space_read_8 > -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "aarch64" || \ > - ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc64le" > +.if ${MACHINE_ARCH} == "i386" > _bnxt= bnxt > .endif > I've committed this. Thanks for the suggestion. I need to commit an update to i386 NOTES file to take out bnxt of there as well since the new code doesn't build there anymore. Warner --000000000000ad7e7105ecb1fe66 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Nov 4, 2022 at 8:45 PM Kyle E= vans <kevans@freebsd.org> w= rote:
On Fri, No= v 4, 2022 at 5:56 PM Warner Losh <imp@freebsd.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D75217c2b4700a1954971b1ec3722c39dd934e287<= /a>
>
> commit 75217c2b4700a1954971b1ec3722c39dd934e287
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2022-11-04 22:49:10 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2022-11-04 22:49:10 +0000
>
>=C2=A0 =C2=A0 =C2=A0bnxt: Only build on 64-bit platforms
>
>=C2=A0 =C2=A0 =C2=A0The driver uses bus_space_read_8 and friends, which= do not exist on
>=C2=A0 =C2=A0 =C2=A032-bit i386 and break the build.
>
>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Netflix
> ---
>=C2=A0 sys/modules/Makefile | 8 +++++++-
>=C2=A0 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/sys/modules/Makefile b/sys/modules/Makefile
> index 3a009f071cab..091fa7543164 100644
> --- a/sys/modules/Makefile
> +++ b/sys/modules/Makefile
[ ... skip ...]
> @@ -424,6 +424,12 @@ SUBDIR+=3D=C2=A0 =C2=A0dtrace
>=C2=A0 SUBDIR+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0opensolaris
>=C2=A0 .endif
>
> +# Requires bus_space_read_8
> +.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D= =3D "aarch64" || \
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0${MACHINE_ARCH} =3D=3D "powerpc64&quo= t; || ${MACHINE_ARCH} =3D=3D "powerpc64le"
> +_bnxt=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bnxt
> +.endif
> +
>=C2=A0 .if ${MK_CRYPT} !=3D "no" || defined(ALL_MODULES)
>=C2=A0 .if exists(${SRCTOP}/sys/opencrypto)
>=C2=A0 _crypto=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0crypto

It looks like i386 really is the outlier here, any reason not to do
this instead? (minor build fix for 32-bit platforms included, I
test-built armv6, armv7, powerpc)

diff --git a/sys/dev/bnxt/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_hwrm.c
index c362e01a1f8b..28e4ef7201ff 100644
--- a/sys/dev/bnxt/bnxt_hwrm.c
+++ b/sys/dev/bnxt/bnxt_hwrm.c
@@ -1483,7 +1483,7 @@ bnxt_hwrm_l2_filter_alloc(struct bnxt_softc
*softc, uint16_t vlan_tag,

=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (*filter_id !=3D -1) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 device_printf(softc= ->dev, "Attempt to re-allocate l2 ctx "
-=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"filter (fid: 0x%lx)\n", *f= ilter_id);
+=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"filter (fid: 0x%jx)\n", (u= intmax_t)*filter_id);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return EDOOFUS;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 091fa7543164..bd55beb316fc 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -425,8 +425,7 @@ SUBDIR+=3D=C2=A0 =C2=A0 opensolaris
=C2=A0.endif

=C2=A0# Requires bus_space_read_8
-.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D &qu= ot;aarch64" || \
-=C2=A0 =C2=A0 =C2=A0 =C2=A0${MACHINE_ARCH} =3D=3D "powerpc64" ||= ${MACHINE_ARCH} =3D=3D "powerpc64le"
+.if ${MACHINE_ARCH} =3D=3D "i386"
=C2=A0_bnxt=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bnxt
=C2=A0.endif


--000000000000ad7e7105ecb1fe66--