On Wed, Oct 05, 2022 at 06:37:14PM +0200, Cornelia Huck wrote: > On Mon, Oct 03 2022, Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > > > This is only 1.8k, putting it in its own module is going to waste more > > space rounding up to a PAGE_SIZE than it is worth. Put it in the main > > vfio.ko module now that kbuild can support multiple .c files. > > > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > > --- > > drivers/vfio/Makefile | 4 +--- > > drivers/vfio/vfio.h | 13 +++++++++++++ > > drivers/vfio/vfio_main.c | 7 +++++++ > > drivers/vfio/virqfd.c | 16 ++-------------- > > 4 files changed, 23 insertions(+), 17 deletions(-) > > > > diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile > > index 50b8e8e3fb10dd..0721ed4831c92f 100644 > > --- a/drivers/vfio/Makefile > > +++ b/drivers/vfio/Makefile > > @@ -1,13 +1,11 @@ > > # SPDX-License-Identifier: GPL-2.0 > > -vfio_virqfd-y := virqfd.o > > - > > obj-$(CONFIG_VFIO) += vfio.o > > > > vfio-y += vfio_main.o \ > > iova_bitmap.o \ > > container.o > > +vfio-$(CONFIG_VFIO_VIRQFD) += virqfd.o > > I think you need to make VFIO_VIRQFD bool instead of tristate now? > > > > > -obj-$(CONFIG_VFIO_VIRQFD) += vfio_virqfd.o > > obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o > > obj-$(CONFIG_VFIO_IOMMU_SPAPR_TCE) += vfio_iommu_spapr_tce.o > > obj-$(CONFIG_VFIO_PCI) += pci/ > > (...) > > > diff --git a/drivers/vfio/virqfd.c b/drivers/vfio/virqfd.c > > index 414e98d82b02e5..0ff3c1519df0bd 100644 > > --- a/drivers/vfio/virqfd.c > > +++ b/drivers/vfio/virqfd.c > > @@ -13,14 +13,10 @@ > > #include <linux/module.h> > > #include <linux/slab.h> > > And this needs an #include "vfio.h", I think? Yes, thanks, I picked those up from zero day and will resend on rc1 Jason