Skip site navigation (1)Skip section navigation (2)
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 &lt;<a href="mailto:kevans@freebsd.org">kevans@freebsd.org</a>&gt; 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 &lt;<a href="mailto:imp@freebsd.org" target="_blank">imp@freebsd.org</a>&gt; wrote:<br>
&gt;<br>
&gt; The branch main has been updated by imp:<br>
&gt;<br>
&gt; 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>;
&gt;<br>
&gt; commit 75217c2b4700a1954971b1ec3722c39dd934e287<br>
&gt; Author:     Warner Losh &lt;imp@FreeBSD.org&gt;<br>
&gt; AuthorDate: 2022-11-04 22:49:10 +0000<br>
&gt; Commit:     Warner Losh &lt;imp@FreeBSD.org&gt;<br>
&gt; CommitDate: 2022-11-04 22:49:10 +0000<br>
&gt;<br>
&gt;     bnxt: Only build on 64-bit platforms<br>
&gt;<br>
&gt;     The driver uses bus_space_read_8 and friends, which do not exist on<br>
&gt;     32-bit i386 and break the build.<br>
&gt;<br>
&gt;     Sponsored by:           Netflix<br>
&gt; ---<br>
&gt;  sys/modules/Makefile | 8 +++++++-<br>
&gt;  1 file changed, 7 insertions(+), 1 deletion(-)<br>
&gt;<br>
&gt; diff --git a/sys/modules/Makefile b/sys/modules/Makefile<br>
&gt; index 3a009f071cab..091fa7543164 100644<br>
&gt; --- a/sys/modules/Makefile<br>
&gt; +++ b/sys/modules/Makefile<br>
[ ... skip ...]<br>
&gt; @@ -424,6 +424,12 @@ SUBDIR+=   dtrace<br>
&gt;  SUBDIR+=       opensolaris<br>
&gt;  .endif<br>
&gt;<br>
&gt; +# Requires bus_space_read_8<br>
&gt; +.if ${MACHINE_ARCH} == &quot;amd64&quot; || ${MACHINE_ARCH} == &quot;aarch64&quot; || \<br>
&gt; +       ${MACHINE_ARCH} == &quot;powerpc64&quot; || ${MACHINE_ARCH} == &quot;powerpc64le&quot;<br>
&gt; +_bnxt=         bnxt<br>
&gt; +.endif<br>
&gt; +<br>
&gt;  .if ${MK_CRYPT} != &quot;no&quot; || defined(ALL_MODULES)<br>
&gt;  .if exists(${SRCTOP}/sys/opencrypto)<br>
&gt;  _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-&gt;dev, &quot;Attempt to re-allocate l2 ctx &quot;<br>
-                               &quot;filter (fid: 0x%lx)\n&quot;, *filter_id);<br>
+                               &quot;filter (fid: 0x%jx)\n&quot;, (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} == &quot;amd64&quot; || ${MACHINE_ARCH} == &quot;aarch64&quot; || \<br>
-       ${MACHINE_ARCH} == &quot;powerpc64&quot; || ${MACHINE_ARCH} == &quot;powerpc64le&quot;<br>
+.if ${MACHINE_ARCH} == &quot;i386&quot;<br>
 _bnxt=         bnxt<br>
 .endif<br></blockquote><div><br></div><div>I&#39;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&#39;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>