linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ
@ 2025-08-18  6:32 Nipun Gupta
  2025-08-18  6:32 ` [PATCH 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ Nipun Gupta
  2025-08-18 12:22 ` [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ Agarwal, Nikhil
  0 siblings, 2 replies; 4+ messages in thread
From: Nipun Gupta @ 2025-08-18  6:32 UTC (permalink / raw)
  To: arnd, gregkh, nikhil.agarwal
  Cc: linux-kernel, llvm, oe-kbuild-all, robin.murphy, krzk, tglx, maz,
	linux, chenqiuji666, peterz, robh, abhijit.gangurde, nathan,
	Arnd Bergmann

From: Arnd Bergmann <arnd@kernel.org>

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>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
---

This change is resent from:
https://lore.kernel.org/all/20250805161059.4006484-1-arnd@kernel.org/

VFIO CDX needed similar compilation changes as reported by Kernel bot at:
https://lore.kernel.org/all/202508070308.opy5dIFX-lkp@intel.com/
Patch 2/2 adds changes in VFIO CDX driver.

 drivers/cdx/Kconfig                     | 1 -
 drivers/cdx/cdx.c                       | 2 +-
 drivers/cdx/controller/Kconfig          | 1 -
 drivers/cdx/controller/cdx_controller.c | 3 ++-
 4 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/cdx/Kconfig b/drivers/cdx/Kconfig
index 3af41f51cf38..1f1e360507d7 100644
--- a/drivers/cdx/Kconfig
+++ b/drivers/cdx/Kconfig
@@ -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
diff --git a/drivers/cdx/cdx.c b/drivers/cdx/cdx.c
index 092306ca2541..1a5c95ba09ba 100644
--- a/drivers/cdx/cdx.c
+++ b/drivers/cdx/cdx.c
@@ -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;
diff --git a/drivers/cdx/controller/Kconfig b/drivers/cdx/controller/Kconfig
index 0641a4c21e66..a480b62cbd1f 100644
--- a/drivers/cdx/controller/Kconfig
+++ b/drivers/cdx/controller/Kconfig
@@ -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
diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c
index fca83141e3e6..5e3fd89b6b56 100644
--- a/drivers/cdx/controller/cdx_controller.c
+++ b/drivers/cdx/controller/cdx_controller.c
@@ -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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ
  2025-08-18  6:32 [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ Nipun Gupta
@ 2025-08-18  6:32 ` Nipun Gupta
  2025-08-19  5:47   ` kernel test robot
  2025-08-18 12:22 ` [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ Agarwal, Nikhil
  1 sibling, 1 reply; 4+ messages in thread
From: Nipun Gupta @ 2025-08-18  6:32 UTC (permalink / raw)
  To: arnd, gregkh, nikhil.agarwal
  Cc: linux-kernel, llvm, oe-kbuild-all, robin.murphy, krzk, tglx, maz,
	linux, chenqiuji666, peterz, robh, abhijit.gangurde, nathan,
	Nipun Gupta, kernel test robot

Define dummy MSI related APIs in VFIO CDX driver to build the
driver without enabling CONFIG_GENERIC_MSI_IRQ flag.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508070308.opy5dIFX-lkp@intel.com/
Reviewed-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
---
 drivers/vfio/cdx/Makefile  |  6 +++++-
 drivers/vfio/cdx/private.h | 14 ++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/vfio/cdx/Makefile b/drivers/vfio/cdx/Makefile
index df92b320122a..7dc7bdcdcaa9 100644
--- a/drivers/vfio/cdx/Makefile
+++ b/drivers/vfio/cdx/Makefile
@@ -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
+obj-$(CONFIG_VFIO_CDX) += intr.o
+endif
diff --git a/drivers/vfio/cdx/private.h b/drivers/vfio/cdx/private.h
index dc56729b3114..0482a1516439 100644
--- a/drivers/vfio/cdx/private.h
+++ b/drivers/vfio/cdx/private.h
@@ -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 0;
+}
+
+static void vfio_cdx_irqs_cleanup(struct vfio_cdx_device *vdev)
+{
+}
+#endif
 
 #endif /* VFIO_CDX_PRIVATE_H */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ
  2025-08-18  6:32 [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ Nipun Gupta
  2025-08-18  6:32 ` [PATCH 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ Nipun Gupta
@ 2025-08-18 12:22 ` Agarwal, Nikhil
  1 sibling, 0 replies; 4+ messages in thread
From: Agarwal, Nikhil @ 2025-08-18 12:22 UTC (permalink / raw)
  To: Gupta, Nipun, arnd@arndb.de, gregkh@linuxfoundation.org
  Cc: linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	oe-kbuild-all@lists.linux.dev, robin.murphy@arm.com,
	krzk@kernel.org, tglx@linutronix.de, maz@kernel.org,
	linux@weissschuh.net, chenqiuji666@gmail.com,
	peterz@infradead.org, robh@kernel.org, Gangurde, Abhijit,
	nathan@kernel.org, Arnd Bergmann


> -----Original Message-----
> From: Nipun Gupta <nipun.gupta@amd.com>
> Sent: Monday, August 18, 2025 12:03 PM
> To: arnd@arndb.de; gregkh@linuxfoundation.org; Agarwal, Nikhil
> <nikhil.agarwal@amd.com>
> Cc: linux-kernel@vger.kernel.org; llvm@lists.linux.dev; oe-kbuild-
> all@lists.linux.dev; robin.murphy@arm.com; krzk@kernel.org; tglx@linutronix.de;
> maz@kernel.org; linux@weissschuh.net; chenqiuji666@gmail.com;
> peterz@infradead.org; robh@kernel.org; Gangurde, Abhijit
> <abhijit.gangurde@amd.com>; nathan@kernel.org; Arnd Bergmann
> <arnd@kernel.org>
> Subject: [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ
> 
> From: Arnd Bergmann <arnd@kernel.org>
> 
> 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>
> Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Reviewed-by: Nikhil Agarwal <nikhil.agarwal@amd.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ
  2025-08-18  6:32 ` [PATCH 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ Nipun Gupta
@ 2025-08-19  5:47   ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2025-08-19  5:47 UTC (permalink / raw)
  To: Nipun Gupta, arnd, gregkh, nikhil.agarwal
  Cc: llvm, oe-kbuild-all, linux-kernel, robin.murphy, krzk, tglx, maz,
	linux, chenqiuji666, peterz, robh, abhijit.gangurde, nathan,
	Nipun Gupta, kernel test robot

Hi Nipun,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.17-rc2 next-20250818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Nipun-Gupta/vfio-cdx-update-driver-to-build-without-CONFIG_GENERIC_MSI_IRQ/20250818-143703
base:   linus/master
patch link:    https://lore.kernel.org/r/20250818063244.1242634-2-nipun.gupta%40amd.com
patch subject: [PATCH 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ
config: powerpc-randconfig-003-20250819 (https://download.01.org/0day-ci/archive/20250819/202508191254.kSWLsaT3-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 93d24b6b7b148c47a2fa228a4ef31524fa1d9f3f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250819/202508191254.kSWLsaT3-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508191254.kSWLsaT3-lkp@intel.com/

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

ERROR: modpost: missing MODULE_LICENSE() in drivers/vfio/cdx/intr.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vfio/cdx/intr.o
>> ERROR: modpost: "vfio_cdx_irqs_cleanup" [drivers/vfio/cdx/vfio-cdx.ko] undefined!
>> ERROR: modpost: "vfio_cdx_set_irqs_ioctl" [drivers/vfio/cdx/vfio-cdx.ko] undefined!
>> WARNING: modpost: module intr uses symbol cdx_enable_msi from namespace CDX_BUS, but does not import it.
>> WARNING: modpost: module intr uses symbol cdx_disable_msi from namespace CDX_BUS, but does not import it.

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-19  5:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18  6:32 [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ Nipun Gupta
2025-08-18  6:32 ` [PATCH 2/2] vfio/cdx: update driver to build without CONFIG_GENERIC_MSI_IRQ Nipun Gupta
2025-08-19  5:47   ` kernel test robot
2025-08-18 12:22 ` [PATCH RESEND 1/2] cdx: don't select CONFIG_GENERIC_MSI_IRQ Agarwal, Nikhil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).