From nobody Wed Jun 15 23:28:40 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 19397850A3F for ; Wed, 15 Jun 2022 23:28:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x92f.google.com (mail-ua1-x92f.google.com [IPv6:2607:f8b0:4864:20::92f]) (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 4LNhMY2TJ9z4rqN for ; Wed, 15 Jun 2022 23:28:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x92f.google.com with SMTP id l12so4886080uan.5 for ; Wed, 15 Jun 2022 16:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eJWxy5+heGKOzZPpT4NaMxQShjnrt60wIDq8I/6SAoU=; b=cXam7kJZeCg9s5QpQ+67gXTcnI6X/X1ADA2JkcXNl0n7zi3Pu9Wh2/Fvc6eMYo348M g1mCh7jfaZbks2AoEPs1qbhTIJyf/oBAZdD6nrGMKKMfSNFE/4UJg5bmt9hux95gw4NW Izl4+INCn6EosRce/wwWcc6Vw7ilX8mOIe429ua6K/GllNo1QCpnLfc4OrmpXw29Gn1N 9r8tJctHFkVSgWidYgCSZBbHkD2oE+dny4UVMMHD2H0LoJbfc5mv94WSFYr1fqGr+AuY 2wm5y9BQ4nDG6DiU+kRJimnUkiJiWCHKDA7CxXUseRuzIGvO3fkAYkBg6MoLeWavr85p 4+Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eJWxy5+heGKOzZPpT4NaMxQShjnrt60wIDq8I/6SAoU=; b=LQ9VK9pt1FImySj7Qoo7/j1Xhg8JWrMrwJf3CIoe+mXRXnXeI1oRe7lN/Mb28KDoJk 7oiCd9i2kfOgqm3CxjvQm+WGmMCTs0DWnXDIhGlppnHo4yHrT1CEo2DZu6hL8a9wxLzV nKY5xenGhISDDp4qvK7eDRiHTFzWiax8JXKLc6CO+n5VgqsZUHS5BMwIgAWSd/MCMZP8 yh7S5S5pe1dRf6XnwAfS1mC8GDYWQATvcThExhRIXu5l52vGqHhJ0BMW+AAcF7Jk4FRt 797B2fK/C5BT1DfHSuv1LUQ9DeKE+SUPgDaAnfnaKBSu6sLehmze1ZqvUJuJauTudt/f 4aCw== X-Gm-Message-State: AJIora/8inAhgD3dK9AI+E+jM9kg7anXNyJOTocuTs66mFzlJvIbY3cA 4CF6DH7jiZGyAaJJ2OSfFmV7NBBbffuTiUTc7OeTug== X-Google-Smtp-Source: AGRyM1vUi8GBE6XlQ8kV516Ey6JUqXqEoj0VBizNBuxBRP6F78jhdqFUP27LkJjXW9NKS1dRd2APPi5Ed9wc8ew9Alg= X-Received: by 2002:ab0:5781:0:b0:37b:de3d:5d4e with SMTP id x1-20020ab05781000000b0037bde3d5d4emr1098281uaa.1.1655335731511; Wed, 15 Jun 2022 16:28:51 -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: <202206121843.25CIhcLr014633@gitrepo.freebsd.org> <0e2172f8-21c1-afb1-9d2b-03ef14a4edf5@FreeBSD.org> <81e113f5-b390-b0d9-d8c5-c4be120e64a6@FreeBSD.org> In-Reply-To: <81e113f5-b390-b0d9-d8c5-c4be120e64a6@FreeBSD.org> From: Warner Losh Date: Wed, 15 Jun 2022 17:28:40 -0600 Message-ID: Subject: Re: git: 0f7b9777f8f3 - main - rtw88: split driver up into a core and pci part To: John Baldwin Cc: "Bjoern A. Zeeb" , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000042d8a005e184e288" X-Rspamd-Queue-Id: 4LNhMY2TJ9z4rqN X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=cXam7kJZ; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::92f) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::92f:from]; MLMMJ_DEST(0.00)[dev-commits-src-main]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --00000000000042d8a005e184e288 Content-Type: text/plain; charset="UTF-8" On Wed, Jun 15, 2022, 3:54 PM John Baldwin 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


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 cl= ass
>> will have PCI, so lack of PCI is quite specious.=C2=A0 That said, = historically
>> per-bus attachment code was indeed much smaller.=C2=A0 OTOH, you c= an also
>> selectively include files in the .ko at build-time, e.g. based on<= br> >> whether or not the base kernel included 'device pci' by ch= ecking for
>> DEV_PCI in KERN_OPTS, something like:
>>
>> .if ${KERN_OPTS:MDEV_PCI}
>> SRCS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0if_rtw88_pci.c
>> .endif
>>
>> This more closely matches what happens in the kernel where you wou= ld have
>> the sys/conf/files line be 'if_rtw88_pci.c=C2=A0 =C2=A0optiona= l rtw88 pci'
>
> I like this idea and it indeed more closely matches the intentions and=
> seems to be a better idea.=C2=A0 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 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's an interesting= case and I think I have a good solution, but want to speak with code...

Warner=C2=A0
--00000000000042d8a005e184e288--