Re: git: 0f7b9777f8f3 - main - rtw88: split driver up into a core and pci part
- In reply to: John Baldwin : "Re: git: 0f7b9777f8f3 - main - rtw88: split driver up into a core and pci part"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Jun 2022 23:28:40 UTC
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 >