Re: [PATCH v2 2/4] iommufd: Move iommufd_sw_msi and related functions to driver.c

From: Nicolin Chen
Date: Fri Feb 28 2025 - 13:11:16 EST


On Fri, Feb 28, 2025 at 02:02:15PM -0400, Jason Gunthorpe wrote:
> On Fri, Feb 28, 2025 at 09:54:28AM -0800, Nicolin Chen wrote:
> > > Stubbed out too if CONFIG_IRQ_MSI_IOMMU ?
> >
> > In that case, the other caller iommufd_group_setup_msi() could be
> > {
> > #if IS_ENABLED(CONFIG_IRQ_MSI_IOMMU)
> > ....
> > iommufd_sw_msi_install();
> > ...
> > #endif
> > return 0;
> > }
> > ?
>
> Or a empty static inline
>
> > > I'm still wondering if we should use a function pointer, how big was
> > > this compiled anyhow?
> >
> > Hmm, you mean the size of driver.o? It's 192K (before) vs 212K
> > (after).
>
> Yes, but use the 'size' command to measure before/after

Before:
text data bss dec hex filename
722 44 0 766 2fe drivers/iommu/iommufd/driver.o
After:
text data bss dec hex filename
1888 100 0 1988 7c4 drivers/iommu/iommufd/driver.o

Thanks
Nicolin