Skip to contentSkip to conversation

IB/qib: don't use qib_wc_x86_64 for UML

PATCH In review Randy Dunlap 5 participants 7 messages Nov 30, 2022 – Dec 1, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 IB/qib: don't use qib_wc_x86_64 for UML

When building qib_wc_x86_64.c on ARCH=um, references to some cpuinfo fields cause build errors since cpuinfo does not contain x86-specific fields.

Fix the build errors by making this driver depend on !UML.

Prevents these build errors:

../drivers/infiniband/hw/qib/qib_wc_x86_64.c: In function ‘qib_unordered_wc’:
../drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:29: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
149 | return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
../drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:44: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
149 | return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
../drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:44: note: each undeclared identifier is reported only once for each function it appears in ../drivers/infiniband/hw/qib/qib_wc_x86_64.c:150:1: error: control reaches end of non-void function [-Werror=return-type]
150 | }

Fixes 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Cc Jason Gunthorpe <[email protected]>
Cc Leon Romanovsky <[email protected]>
Cc Dennis Dalessandro <[email protected]>
Cc Jeff Dike <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Anton Ivanov <[email protected]>
Cc Johannes Berg <[email protected]>

---
v2: rebase & resend

 drivers/infiniband/hw/qib/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/qib/Kconfig +1 -0
diff -- a/drivers/infiniband/hw/qib/Kconfig b/drivers/infiniband/hw/qib/Kconfig
@@ -3,6 +3,7 @@ config INFINIBAND_QIB
 	tristate "Intel PCIe HCA support"
 	depends on 64BIT && INFINIBAND_RDMAVT
 	depends on PCI
+	depends on !UML
 	help
 	This is a low-level driver for Intel PCIe QLE InfiniBand host
 	channel adapters.  This driver does not support the Intel

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um

#1 lore raw
Quoted 38 lines · Randy Dunlap

When building qib_wc_x86_64.c on ARCH=um, references to some cpuinfo fields cause build errors since cpuinfo does not contain x86-specific fields.

Fix the build errors by making this driver depend on !UML.

Prevents these build errors:

../drivers/infiniband/hw/qib/qib_wc_x86_64.c: In function ‘qib_unordered_wc’:
../drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:29: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
149 | return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
../drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:44: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
149 | return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
../drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:44: note: each undeclared identifier is reported only once for each function it appears in ../drivers/infiniband/hw/qib/qib_wc_x86_64.c:150:1: error: control reaches end of non-void function [-Werror=return-type]
150 | }

Fixes 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Cc Jason Gunthorpe <[email protected]>
Cc Leon Romanovsky <[email protected]>
Cc Dennis Dalessandro <[email protected]>
Cc Jeff Dike <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Anton Ivanov <[email protected]>
Cc Johannes Berg <[email protected]>

---
v2: rebase & resend

 drivers/infiniband/hw/qib/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff -- a/drivers/infiniband/hw/qib/Kconfig b/drivers/infiniband/hw/qib/Kconfig

drivers/infiniband/hw/qib/Kconfig config INFINIBAND_QIB · line 6

Quoted 4 lines
drivers/infiniband/hw/qib/Kconfig +1 -0
@@ -3,6 +3,7 @@ config INFINIBAND_QIB
 	tristate "Intel PCIe HCA support"
 	depends on 64BIT && INFINIBAND_RDMAVT
 	depends on PCI
+	depends on !UML

I would advocate to add this line to whole drivers/infiniband. None of RDMA code makes sense for UML.

Thanks

Quoted 3 lines
drivers/infiniband/hw/qib/Kconfig +0 -0
 	help
 	This is a low-level driver for Intel PCIe QLE InfiniBand host
 	channel adapters.  This driver does not support the Intel
#2 lore raw

----- Ursprüngliche Mail -----

Quoted 2 lines

I would advocate to add this line to whole drivers/infiniband. None of RDMA code makes sense for UML.

Yes. Makes sense.

Thanks,
//richard

maintainer
#3 lore raw
In reply to Leon Romanovsky
Quoted 11 lines · Leon Romanovsky

drivers/infiniband/hw/qib/Kconfig config INFINIBAND_QIB · line 6

Quoted 7 lines

+++ b/drivers/infiniband/hw/qib/Kconfig

drivers/infiniband/hw/qib/Kconfig +1 -0
@@ -3,6 +3,7 @@ config INFINIBAND_QIB
 	tristate "Intel PCIe HCA support"
 	depends on 64BIT && INFINIBAND_RDMAVT
 	depends on PCI
+	depends on !UML

I would advocate to add this line to whole drivers/infiniband. None of RDMA code makes sense for UML.

You could argue that one might want to eventually use kunit for some bits and pieces in there, so it'd make sense to be able to build the parts that _can_ be built, but I have no idea :)

johannes

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um

#4 lore raw
Quoted 13 lines · Johannes Berg
Quoted 11 lines · Leon Romanovsky

drivers/infiniband/hw/qib/Kconfig config INFINIBAND_QIB · line 6

Quoted 7 lines

+++ b/drivers/infiniband/hw/qib/Kconfig

drivers/infiniband/hw/qib/Kconfig +1 -0
@@ -3,6 +3,7 @@ config INFINIBAND_QIB
 	tristate "Intel PCIe HCA support"
 	depends on 64BIT && INFINIBAND_RDMAVT
 	depends on PCI
+	depends on !UML

I would advocate to add this line to whole drivers/infiniband. None of RDMA code makes sense for UML.

Quoted 3 lines

You could argue that one might want to eventually use kunit for some bits and pieces in there, so it'd make sense to be able to build the parts that _can_ be built, but I have no idea :)

But now, we don't have anyone in RDMA who uses kunit. Once it will be needed, he/she will extend drivers/infiniband to support it.

Thanks

Quoted 2 lines

johannes

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um

#6 lore raw
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Leon Romanovsky

I would advocate to add this line to whole drivers/infiniband. None of RDMA code makes sense for UML.

software iWarp and RoCE absolutely make sense on UML.

Ok, to be more pedantic "none of RDMA HW code ...". However does anybody use rxe or siw in UML?

Thanks