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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 4, 2022 at 8:45 PM Kyle Evans <<a href="mailto:kevans@freebsd.org">kevans@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Nov 4, 2022 at 5:56 PM Warner Losh <<a href="mailto:imp@freebsd.org" target="_blank">imp@freebsd.org</a>> wrote:<br> ><br> > The branch main has been updated by imp:<br> ><br> > URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=75217c2b4700a1954971b1ec3722c39dd934e287" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=75217c2b4700a1954971b1ec3722c39dd934e287</a><br> ><br> > commit 75217c2b4700a1954971b1ec3722c39dd934e287<br> > Author: Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2022-11-04 22:49:10 +0000<br> > Commit: Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2022-11-04 22:49:10 +0000<br> ><br> > bnxt: Only build on 64-bit platforms<br> ><br> > The driver uses bus_space_read_8 and friends, which do not exist on<br> > 32-bit i386 and break the build.<br> ><br> > Sponsored by: Netflix<br> > ---<br> > sys/modules/Makefile | 8 +++++++-<br> > 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+= dtrace<br> > SUBDIR+= opensolaris<br> > .endif<br> ><br> > +# Requires bus_space_read_8<br> > +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "aarch64" || \<br> > + ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc64le"<br> > +_bnxt= bnxt<br> > +.endif<br> > +<br> > .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)<br> > .if exists(${SRCTOP}/sys/opencrypto)<br> > _crypto= crypto<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> if (*filter_id != -1) {<br> device_printf(softc->dev, "Attempt to re-allocate l2 ctx "<br> - "filter (fid: 0x%lx)\n", *filter_id);<br> + "filter (fid: 0x%jx)\n", (uintmax_t)*filter_id);<br> return EDOOFUS;<br> }<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+= opensolaris<br> .endif<br> <br> # Requires bus_space_read_8<br> -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "aarch64" || \<br> - ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc64le"<br> +.if ${MACHINE_ARCH} == "i386"<br> _bnxt= bnxt<br> .endif<br></blockquote><div><br></div><div>I've committed this. Thanks for the suggestion. I need to commit an update to i386</div><div>NOTES file to take out bnxt of there as well since the new code doesn't build there anymore.</div><div><br></div><div>Warner </div></div></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpWx0P75NszGqVTGZDnzkytXx2BFQr5XTnbz9gREeXkgg>
