cdx: don't select CONFIG_GENERIC_MSI_IRQ
Subsystems (4)
Nipun Gupta
maintainerPATCH v4 1/2 cdx: don't select CONFIG_GENERIC_MSI_IRQ
x86 does not use CONFIG_GENERIC_MSI_IRQ, and trying to enable it anyway results in a build failure:
In file included from include/linux/ssb/ssb.h:10,
from drivers/ssb/pcihost_wrapper.c:18:include/linux/gpio/driver.h:41:33: error: field 'msiinfo' has incomplete type
41 | msi_alloc_info_t msiinfo;
| ^~~~~~~
In file included from include/linux/kvm_host.h:19,
from arch/x86/events/intel/core.c:17:include/linux/msi.h:528:33: error: field 'alloc_info' has incomplete type
528 | msi_alloc_info_t alloc_info;
Change the driver to actually build without this symbol and remove the incorrect 'select' statements.
---
Changes v1->v2:
- No change
Changes v2->v3:
- add CONFIG_GENERIC_MSI_IRQ while assigning num_msi and setting msi domain Changes v3->v4:
- No change
drivers/cdx/Kconfig | 1 - drivers/cdx/cdx.c | 4 ++-- drivers/cdx/controller/Kconfig | 1 - drivers/cdx/controller/cdx_controller.c | 3 ++- 4 files changed, 4 insertions(+), 5 deletions(-)
drivers/cdx/Kconfig +0 -1
@@ -8,7 +8,6 @@ config CDX_BUS bool "CDX Bus driver" depends on OF && ARM64 || COMPILE_TEST - select GENERIC_MSI_IRQ help Driver to enable Composable DMA Transfer(CDX) Bus. CDX bus exposes Fabric devices which uses composable DMA IP to the
drivers/cdx/cdx.c +2 -2
@@ -310,7 +310,7 @@ static int cdx_probe(struct device *dev)* Setup MSI device data so that generic MSI alloc/free can * be used by the device driver. */ -if (cdx->msi_domain) { +if (IS_ENABLED (CONFIG_GENERIC_MSI_IRQ ) && cdx->msi_domain) { error =msi_setup_device_data (&cdx_dev->dev);if (error)return error;
@@ -833,7 +833,7 @@ int cdx_device_add(struct cdx_dev_params *dev_params) ((cdx->id <<CDX_CONTROLLER_ID_SHIFT ) | (cdx_dev->bus_num &CDX_BUS_NUM_MASK )), cdx_dev->dev_num); -if (cdx->msi_domain) { +if (IS_ENABLED (CONFIG_GENERIC_MSI_IRQ ) && cdx->msi_domain) { cdx_dev->num_msi = dev_params->num_msi;dev_set_msi_domain (&cdx_dev->dev, cdx->msi_domain); }
drivers/cdx/controller/Kconfig +0 -1
@@ -10,7 +10,6 @@ if CDX_BUS config CDX_CONTROLLER tristate "CDX bus controller" depends on HAS_DMA - select GENERIC_MSI_IRQ select REMOTEPROC select RPMSG help
drivers/cdx/controller/cdx_controller.c +2 -1
@@ -193,7 +193,8 @@ static int xlnx_cdx_probe(struct platform_device *pdev) cdx->ops = &cdx_ops;/* Create MSI domain */ - cdx->msi_domain =cdx_msi_domain_init (&pdev->dev); +if (IS_ENABLED (CONFIG_GENERIC_MSI_IRQ )) + cdx->msi_domain =cdx_msi_domain_init (&pdev->dev);if (!cdx->msi_domain) { ret =dev_err_probe (&pdev->dev, -ENODEV ,"cdx_msi_domain_init() failed" ); goto cdx_msi_fail;
Signature · 1 line
2.34.1
Nipun Gupta
maintainerPATCH v4 2/2 vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ
Define dummy MSI related APIs in VFIO CDX driver to build the driver without enabling CONFIG_GENERIC_MSI_IRQ flag.
---
Changes v1->v2:
- fix linking intr.c file in Makefile
Changes v2->v3:
- return error from vfio_cdx_set_irqs_ioctl() when CONFIG_GENERIC_MSI_IRQ is disabled
Changes v3->v4:
- changed the return value to -EINVAL from -ENODEV
drivers/vfio/cdx/Makefile | 6 +++++- drivers/vfio/cdx/private.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)
drivers/vfio/cdx/Makefile +5 -1
@@ -5,4 +5,8 @@ obj-$(CONFIG_VFIO_CDX) += vfio-cdx.o -vfio-cdx-objs := main.o intr.o +vfio-cdx-objs := main.o + +ifdef CONFIG_GENERIC_MSI_IRQ +vfio-cdx-objs += intr.o +endif
drivers/vfio/cdx/private.h +14 -0
@@ -38,11 +38,25 @@ struct vfio_cdx_device { u8 config_msi; }; +#ifdef CONFIG_GENERIC_MSI_IRQ int vfio_cdx_set_irqs_ioctl (struct vfio_cdx_device *vdev,u32 flags,unsigned int index,unsigned int start,unsigned int count,void *data);void vfio_cdx_irqs_cleanup (struct vfio_cdx_device *vdev); +#else +static int vfio_cdx_set_irqs_ioctl (struct vfio_cdx_device *vdev, +u32 flags,unsigned int index, +unsigned int start,unsigned int count, +void *data) +{ +return -EINVAL ; +} + +static void vfio_cdx_irqs_cleanup (struct vfio_cdx_device *vdev) +{ +} +#endif #endif /* VFIO_CDX_PRIVATE_H */
Signature · 1 line
2.34.1
Re: [PATCH v4 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ
Quoted 10 lines · On Tue, 26 Aug 2025 10:08:52 +0530 Nipun Gupta <[email protected]> wrote:
Define dummy MSI related APIs in VFIO CDX driver to build the driver without enabling
CONFIG_GENERIC_MSI_IRQflag.Reported-by kernel test robot <[email protected]>Reviewed-by Nikhil Agarwal <[email protected]>Reviewed-by Alex Williamson <[email protected]>Signed-off-by Nipun Gupta <[email protected]>---
Quoted 7 lines
Changes
v1->v2:
- fix linkingintr.cfile inMakefile
Changesv2->v3:
- return error fromvfio_cdx_set_irqs_ioctl()whenCONFIG_GENERIC_MSI_IRQis disabled
Changesv3->v4:
- changed the return value to-EINVALfrom-ENODEV
What are your intentions for merging this series, char-misc or vfio? Thanks,
Alex
Gupta, Nipun
maintainerRE: [PATCH v4 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ
[AMD Official Use Only - AMD Internal Distribution Only]
Quoted 36 lines
-----Original Message-----
From: Alex Williamson <[email protected]>
Sent: Tuesday, August 26, 2025 9:54 PM
To: Gupta, Nipun <[email protected]>
Cc: [email protected]; [email protected]; Agarwal, Nikhil <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Gangurde, Abhijit <[email protected]>; [email protected]; kernel test robot <[email protected]>
Subject: Re: [PATCH v4 2/2] vfio/cdx: update driver to build withoutCONFIG_GENERIC_MSI_IRQQuoted 5 lines · On Tue, 26 Aug 2025 10:08:52 +0530 Nipun Gupta <[email protected]> wrote:
Define dummy MSI related APIs in VFIO CDX driver to build the driver without enabling
CONFIG_GENERIC_MSI_IRQflag.Quoted 5 lines
Reviewed-by Nikhil Agarwal <[email protected]>Reviewed-by Alex Williamson <[email protected]>Signed-off-by Nipun Gupta <[email protected]>---
Quoted 7 lines
Changes
v1->v2:
- fix linkingintr.cfile inMakefile
Changesv2->v3:
- return error fromvfio_cdx_set_irqs_ioctl()whenCONFIG_GENERIC_MSI_IRQis disabled
Changesv3->v4:
- changed the return value to-EINVALfrom-ENODEV
Quoted 1 line
What are your intentions for merging this series, char-misc or vfio?
Yes please, this can be taken via vfio.
Thanks,
Nipun
Re: [PATCH v4 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ
Quoted 38 lines · Nipun
[AMD Official Use Only - AMD Internal Distribution Only]
Quoted 36 lines
-----Original Message-----
From: Alex Williamson <[email protected]>
Sent: Tuesday, August 26, 2025 9:54 PM
To: Gupta, Nipun <[email protected]>
Cc: [email protected]; [email protected]; Agarwal, Nikhil <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Gangurde, Abhijit <[email protected]>; [email protected]; kernel test robot <[email protected]>
Subject: Re: [PATCH v4 2/2] vfio/cdx: update driver to build withoutCONFIG_GENERIC_MSI_IRQQuoted 5 lines · On Tue, 26 Aug 2025 10:08:52 +0530 Nipun Gupta <[email protected]> wrote:
Define dummy MSI related APIs in VFIO CDX driver to build the driver without enabling
CONFIG_GENERIC_MSI_IRQflag.Quoted 12 lines
Reviewed-by Nikhil Agarwal <[email protected]>Reviewed-by Alex Williamson <[email protected]>Signed-off-by Nipun Gupta <[email protected]>---
Changes
v1->v2:
- fix linkingintr.cfile inMakefile
Changesv2->v3:
- return error fromvfio_cdx_set_irqs_ioctl()whenCONFIG_GENERIC_MSI_IRQis disabled
Changesv3->v4:
- changed the return value to-EINVALfrom-ENODEV
Quoted 3 lines
Quoted 1 line
What are your intentions for merging this series, char-misc or vfio?
Yes please, this can be taken via vfio.
Series applied to vfio next branch for v6.18. Thanks,
Alex