]> www.infradead.org Git - users/hch/misc.git/commitdiff
cdx: don't select CONFIG_GENERIC_MSI_IRQ
authorNipun Gupta <nipun.gupta@amd.com>
Tue, 26 Aug 2025 04:38:51 +0000 (10:08 +0530)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 27 Aug 2025 18:14:12 +0000 (12:14 -0600)
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>
drivers/cdx/Kconfig
drivers/cdx/cdx.c
drivers/cdx/controller/Kconfig
drivers/cdx/controller/cdx_controller.c

index 3af41f51cf38bc0611533fe7da4d16eb35b4573d..1f1e360507d7d5c33671c601534e82f2d4de0424 100644 (file)
@@ -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
index 092306ca2541cc3063864aa4b58c9035532c4537..3d50f8cd9c0bd7e0d739232656b07052a30f524e 100644 (file)
@@ -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);
        }
index 0641a4c21e660833efd9ac05e9431b58aa10ec03..a480b62cbd1f74919aef0a35f82ebbb03e92754e 100644 (file)
@@ -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
index fca83141e3e66e68e6916077833db2b7d816395f..5e3fd89b6b561be45fa882af0e546291612e6e56 100644 (file)
@@ -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;