Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Fixes: e8b18c11731d ("cdx: Fix missing GENERIC_MSI_IRQ on compile test")
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Link: https://lore.kernel.org/r/20250826043852.2206008-1-nipun.gupta@amd.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

authored by

Nipun Gupta and committed by
Alex Williamson
ab1d8dda fcf9ae9e

+4 -5
-1
drivers/cdx/Kconfig
··· 8 8 config CDX_BUS 9 9 bool "CDX Bus driver" 10 10 depends on OF && ARM64 || COMPILE_TEST 11 - select GENERIC_MSI_IRQ 12 11 help 13 12 Driver to enable Composable DMA Transfer(CDX) Bus. CDX bus 14 13 exposes Fabric devices which uses composable DMA IP to the
+2 -2
drivers/cdx/cdx.c
··· 310 310 * Setup MSI device data so that generic MSI alloc/free can 311 311 * be used by the device driver. 312 312 */ 313 - if (cdx->msi_domain) { 313 + if (IS_ENABLED(CONFIG_GENERIC_MSI_IRQ) && cdx->msi_domain) { 314 314 error = msi_setup_device_data(&cdx_dev->dev); 315 315 if (error) 316 316 return error; ··· 833 833 ((cdx->id << CDX_CONTROLLER_ID_SHIFT) | (cdx_dev->bus_num & CDX_BUS_NUM_MASK)), 834 834 cdx_dev->dev_num); 835 835 836 - if (cdx->msi_domain) { 836 + if (IS_ENABLED(CONFIG_GENERIC_MSI_IRQ) && cdx->msi_domain) { 837 837 cdx_dev->num_msi = dev_params->num_msi; 838 838 dev_set_msi_domain(&cdx_dev->dev, cdx->msi_domain); 839 839 }
-1
drivers/cdx/controller/Kconfig
··· 10 10 config CDX_CONTROLLER 11 11 tristate "CDX bus controller" 12 12 depends on HAS_DMA 13 - select GENERIC_MSI_IRQ 14 13 select REMOTEPROC 15 14 select RPMSG 16 15 help
+2 -1
drivers/cdx/controller/cdx_controller.c
··· 193 193 cdx->ops = &cdx_ops; 194 194 195 195 /* Create MSI domain */ 196 - cdx->msi_domain = cdx_msi_domain_init(&pdev->dev); 196 + if (IS_ENABLED(CONFIG_GENERIC_MSI_IRQ)) 197 + cdx->msi_domain = cdx_msi_domain_init(&pdev->dev); 197 198 if (!cdx->msi_domain) { 198 199 ret = dev_err_probe(&pdev->dev, -ENODEV, "cdx_msi_domain_init() failed"); 199 200 goto cdx_msi_fail;