[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220102070609.22783-1-rdunlap@infradead.org>
Date: Sat, 1 Jan 2022 23:06:09 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: linux-kernel@...r.kernel.org, Jason Gunthorpe <jgg@...dia.com>,
Jeff Dike <jdike@...toit.com>,
Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>
Cc: linux-rdma@...r.kernel.org, linux-um@...ts.infradead.org,
Randy Dunlap <rdunlap@...radead.org>
Subject: [PATCH 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.
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@...radead.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
Powered by blists - more mailing lists