Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jun 2022 17:28:40 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        "Bjoern A. Zeeb" <bz@freebsd.org>, src-committers <src-committers@freebsd.org>,  "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org
Subject:   Re: git: 0f7b9777f8f3 - main - rtw88: split driver up into a core and pci part
Message-ID:  <CANCZdfoNACdO2OPKD=eNQ%2B9Y5QozZafeBgfZF--X9uHM6D1mOA@mail.gmail.com>
In-Reply-To: <81e113f5-b390-b0d9-d8c5-c4be120e64a6@FreeBSD.org>
References:  <202206121843.25CIhcLr014633@gitrepo.freebsd.org> <d514e0de-9b30-b5c8-2e2f-7e93a36747f7@FreeBSD.org> <CANCZdfoqnsJKLtqrwpY35EMGKoQvEYnn158HQNBHEg1=X%2BKZZA@mail.gmail.com> <alpine.BSF.2.00.2206131640300.68830@ai.fobar.qr> <0e2172f8-21c1-afb1-9d2b-03ef14a4edf5@FreeBSD.org> <alpine.BSF.2.00.2206141648460.68830@ai.fobar.qr> <81e113f5-b390-b0d9-d8c5-c4be120e64a6@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000042d8a005e184e288
Content-Type: text/plain; charset="UTF-8"

On Wed, Jun 15, 2022, 3:54 PM John Baldwin <jhb@freebsd.org> wrote:

> On 6/14/22 9:50 AM, Bjoern A. Zeeb wrote:
> > On Tue, 14 Jun 2022, John Baldwin wrote:
> >
> >>> Why do I need to load 1M file for PCI on a machine w/o PCI?
> >>
> >> Even many SoC boards have PCI, and anything approaching desktop class
> >> will have PCI, so lack of PCI is quite specious.  That said,
> historically
> >> per-bus attachment code was indeed much smaller.  OTOH, you can also
> >> selectively include files in the .ko at build-time, e.g. based on
> >> whether or not the base kernel included 'device pci' by checking for
> >> DEV_PCI in KERN_OPTS, something like:
> >>
> >> .if ${KERN_OPTS:MDEV_PCI}
> >> SRCS+=       if_rtw88_pci.c
> >> .endif
> >>
> >> This more closely matches what happens in the kernel where you would
> have
> >> the sys/conf/files line be 'if_rtw88_pci.c   optional rtw88 pci'
> >
> > I like this idea and it indeed more closely matches the intentions and
> > seems to be a better idea.  I'll revert the change and adjust it to this
> > if that's acceptable?
>
> I would be fine with this, but Warner might have his own vote for this.
>
> I do think that this particular use case is a bit different due to the
> relatively large size of the PCI bus attachment for this driver.
>

I have an idea of what we should do, but I need a day or two to pull the
details together. I hate objecting w/o providing an alternative. It's an
interesting case and I think I have a good solution, but want to speak with
code...

Warner

>

--00000000000042d8a005e184e288
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Wed, Jun 15, 2022, 3:54 PM John Baldwin &lt;<a href=
=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>&gt; wrote:<br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex">On 6/14/22 9:50 AM, Bjoern A. Zeeb wrote:<br>
&gt; On Tue, 14 Jun 2022, John Baldwin wrote:<br>
&gt; <br>
&gt;&gt;&gt; Why do I need to load 1M file for PCI on a machine w/o PCI?<br=
>
&gt;&gt;<br>
&gt;&gt; Even many SoC boards have PCI, and anything approaching desktop cl=
ass<br>
&gt;&gt; will have PCI, so lack of PCI is quite specious.=C2=A0 That said, =
historically<br>
&gt;&gt; per-bus attachment code was indeed much smaller.=C2=A0 OTOH, you c=
an also<br>
&gt;&gt; selectively include files in the .ko at build-time, e.g. based on<=
br>
&gt;&gt; whether or not the base kernel included &#39;device pci&#39; by ch=
ecking for<br>
&gt;&gt; DEV_PCI in KERN_OPTS, something like:<br>
&gt;&gt;<br>
&gt;&gt; .if ${KERN_OPTS:MDEV_PCI}<br>
&gt;&gt; SRCS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0if_rtw88_pci.c<br>
&gt;&gt; .endif<br>
&gt;&gt;<br>
&gt;&gt; This more closely matches what happens in the kernel where you wou=
ld have<br>
&gt;&gt; the sys/conf/files line be &#39;if_rtw88_pci.c=C2=A0 =C2=A0optiona=
l rtw88 pci&#39;<br>
&gt; <br>
&gt; I like this idea and it indeed more closely matches the intentions and=
<br>
&gt; seems to be a better idea.=C2=A0 I&#39;ll revert the change and adjust=
 it to this<br>
&gt; if that&#39;s acceptable?<br>
<br>
I would be fine with this, but Warner might have his own vote for this.<br>
<br>
I do think that this particular use case is a bit different due to the<br>
relatively large size of the PCI bus attachment for this driver.<br></block=
quote></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">I have an i=
dea of what we should do, but I need a day or two to pull the details toget=
her. I hate objecting w/o providing an alternative. It&#39;s an interesting=
 case and I think I have a good solution, but want to speak with code...</d=
iv><div dir=3D"auto"><br></div><div dir=3D"auto">Warner=C2=A0</div><div dir=
=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>

--00000000000042d8a005e184e288--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoNACdO2OPKD=eNQ%2B9Y5QozZafeBgfZF--X9uHM6D1mOA>