linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] IB/qib: don't use qib_wc_x86_64 for UML
@ 2022-01-02  7:06 Randy Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2022-01-02  7:06 UTC (permalink / raw)
  To: linux-kernel, Jason Gunthorpe, Jeff Dike, Richard Weinberger,
	Anton Ivanov, Johannes Berg
  Cc: linux-rdma, linux-um, 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.

This source file is x86_64-specific, so don't include it in the
target object file when CONFIG_UML is set/enabled.

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:22: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
  return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
                      ^
../drivers/infiniband/hw/qib/qib_wc_x86_64.c:149:37: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
  return boot_cpu_data.x86_vendor != X86_VENDOR_AMD;
                                     ^~~~~~~~~~~~~~
../drivers/infiniband/hw/qib/qib_wc_x86_64.c:150:1: error: control reaches end of non-void function [-Werror=return-type]

Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
 drivers/infiniband/hw/qib/Makefile |    2 ++
 1 file changed, 2 insertions(+)

--- linux-next-20211224.orig/drivers/infiniband/hw/qib/Makefile
+++ linux-next-20211224/drivers/infiniband/hw/qib/Makefile
@@ -12,6 +12,8 @@ ib_qib-y := qib_diag.o qib_driver.o qib_
 # 6120 has no fallback if no MSI interrupts, others can do INTx
 ib_qib-$(CONFIG_PCI_MSI) += qib_iba6120.o
 
+ifeq ($(CONFIG_UML),)
 ib_qib-$(CONFIG_X86_64) += qib_wc_x86_64.o
+endif
 ib_qib-$(CONFIG_PPC64) += qib_wc_ppc64.o
 ib_qib-$(CONFIG_DEBUG_FS) += qib_debugfs.o

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-02  7:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02  7:06 [PATCH 1/2] IB/qib: don't use qib_wc_x86_64 for UML Randy Dunlap

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).