Date: Fri, 4 Nov 2022 22:54:58 -0600 From: Warner Losh <imp@bsdimp.com> To: Kyle Evans <kevans@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 75217c2b4700 - main - bnxt: Only build on 64-bit platforms Message-ID: <CANCZdfpWx0P75NszGqVTGZDnzkytXx2BFQr5XTnbz9gREeXkgg@mail.gmail.com> In-Reply-To: <CACNAnaHBEBgFKHbvLFEA_rvt7qO8tdXY35i02vbcAFy6gFBLgQ@mail.gmail.com> References: <202211042255.2A4Mtxr8032843@gitrepo.freebsd.org> <CACNAnaHBEBgFKHbvLFEA_rvt7qO8tdXY35i02vbcAFy6gFBLgQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000ad7e7105ecb1fe66 Content-Type: text/plain; charset="UTF-8" On Fri, Nov 4, 2022 at 8:45 PM Kyle Evans <kevans@freebsd.org> wrote: > On Fri, Nov 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=75217c2b4700a1954971b1ec3722c39dd934e287 > > > > commit 75217c2b4700a1954971b1ec3722c39dd934e287 > > Author: Warner Losh <imp@FreeBSD.org> > > AuthorDate: 2022-11-04 22:49:10 +0000 > > Commit: Warner Losh <imp@FreeBSD.org> > > 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 <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 4, 2022 at 8:45 PM Kyle E= vans <<a href=3D"mailto:kevans@freebsd.org">kevans@freebsd.org</a>> w= rote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0p= x 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, No= v 4, 2022 at 5:56 PM Warner Losh <<a href=3D"mailto:imp@freebsd.org" tar= get=3D"_blank">imp@freebsd.org</a>> wrote:<br> ><br> > The branch main has been updated by imp:<br> ><br> > URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D75217c2b4700= a1954971b1ec3722c39dd934e287" rel=3D"noreferrer" target=3D"_blank">https://= cgit.FreeBSD.org/src/commit/?id=3D75217c2b4700a1954971b1ec3722c39dd934e287<= /a><br> ><br> > commit 75217c2b4700a1954971b1ec3722c39dd934e287<br> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2022-11-04 22:49:10 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2022-11-04 22:49:10 +0000<br> ><br> >=C2=A0 =C2=A0 =C2=A0bnxt: Only build on 64-bit platforms<br> ><br> >=C2=A0 =C2=A0 =C2=A0The driver uses bus_space_read_8 and friends, which= do not exist on<br> >=C2=A0 =C2=A0 =C2=A032-bit i386 and break the build.<br> ><br> >=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Netflix<br> > ---<br> >=C2=A0 sys/modules/Makefile | 8 +++++++-<br> >=C2=A0 1 file changed, 7 insertions(+), 1 deletion(-)<br> ><br> > diff --git a/sys/modules/Makefile b/sys/modules/Makefile<br> > index 3a009f071cab..091fa7543164 100644<br> > --- a/sys/modules/Makefile<br> > +++ b/sys/modules/Makefile<br> [ ... skip ...]<br> > @@ -424,6 +424,12 @@ SUBDIR+=3D=C2=A0 =C2=A0dtrace<br> >=C2=A0 SUBDIR+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0opensolaris<br> >=C2=A0 .endif<br> ><br> > +# Requires bus_space_read_8<br> > +.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D= =3D "aarch64" || \<br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0${MACHINE_ARCH} =3D=3D "powerpc64&quo= t; || ${MACHINE_ARCH} =3D=3D "powerpc64le"<br> > +_bnxt=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bnxt<br> > +.endif<br> > +<br> >=C2=A0 .if ${MK_CRYPT} !=3D "no" || defined(ALL_MODULES)<br> >=C2=A0 .if exists(${SRCTOP}/sys/opencrypto)<br> >=C2=A0 _crypto=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0crypto<br> <br> It looks like i386 really is the outlier here, any reason not to do<br> this instead? (minor build fix for 32-bit platforms included, I<br> test-built armv6, armv7, powerpc)<br> <br> diff --git a/sys/dev/bnxt/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_hwrm.c<br> index c362e01a1f8b..28e4ef7201ff 100644<br> --- a/sys/dev/bnxt/bnxt_hwrm.c<br> +++ b/sys/dev/bnxt/bnxt_hwrm.c<br> @@ -1483,7 +1483,7 @@ bnxt_hwrm_l2_filter_alloc(struct bnxt_softc<br> *softc, uint16_t vlan_tag,<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (*filter_id !=3D -1) {<br> =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 "<br> -=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);<br> +=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);<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return EDOOFUS;<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br> <br> diff --git a/sys/modules/Makefile b/sys/modules/Makefile<br> index 091fa7543164..bd55beb316fc 100644<br> --- a/sys/modules/Makefile<br> +++ b/sys/modules/Makefile<br> @@ -425,8 +425,7 @@ SUBDIR+=3D=C2=A0 =C2=A0 opensolaris<br> =C2=A0.endif<br> <br> =C2=A0# Requires bus_space_read_8<br> -.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D &qu= ot;aarch64" || \<br> -=C2=A0 =C2=A0 =C2=A0 =C2=A0${MACHINE_ARCH} =3D=3D "powerpc64" ||= ${MACHINE_ARCH} =3D=3D "powerpc64le"<br> +.if ${MACHINE_ARCH} =3D=3D "i386"<br> =C2=A0_bnxt=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bnxt<br> =C2=A0.endif<br></blockquote><div><br></div><div>I've committed this. T= hanks for the suggestion. I need to commit an update to i386</div><div>NOTE= S file to take out bnxt=C2=A0of there as well since the new code doesn'= t build there anymore.</div><div><br></div><div>Warner=C2=A0</div></div></d= iv> --000000000000ad7e7105ecb1fe66--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpWx0P75NszGqVTGZDnzkytXx2BFQr5XTnbz9gREeXkgg>