mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-26 20:44:32 +08:00
d5b60e26e8
This is not the first attempt to fix building random configurations, unfortunately the attempt in commita07fc0bb48
("RDMA/hns: Fix build error") caused a new problem when CONFIG_INFINIBAND_HNS_HIP06=m and CONFIG_INFINIBAND_HNS_HIP08=y: drivers/infiniband/hw/hns/hns_roce_main.o:(.rodata+0xe60): undefined reference to `__this_module' Revert commitsa07fc0bb48
("RDMA/hns: Fix build error") anda3e2d4c7e7
("RDMA/hns: remove obsolete Kconfig comment") to get back to the previous state, then fix the issues described there differently, by adding more specific dependencies: INFINIBAND_HNS can now only be built-in if at least one of HNS or HNS3 are built-in, and the individual back-ends are only available if that code is reachable from the main driver. Fixes:a07fc0bb48
("RDMA/hns: Fix build error") Fixes:a3e2d4c7e7
("RDMA/hns: remove obsolete Kconfig comment") Fixes:dd74282df5
("RDMA/hns: Initialize the PCI device for hip08 RoCE") Fixes:08805fdbeb
("RDMA/hns: Split hw v1 driver from hns roce driver") Link: https://lore.kernel.org/r/20191007211826.3361202-1-arnd@arndb.de Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
21 lines
673 B
Makefile
21 lines
673 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Makefile for the Hisilicon RoCE drivers.
|
|
#
|
|
|
|
ccflags-y := -I $(srctree)/drivers/net/ethernet/hisilicon/hns3
|
|
|
|
hns-roce-objs := hns_roce_main.o hns_roce_cmd.o hns_roce_pd.o \
|
|
hns_roce_ah.o hns_roce_hem.o hns_roce_mr.o hns_roce_qp.o \
|
|
hns_roce_cq.o hns_roce_alloc.o hns_roce_db.o hns_roce_srq.o hns_roce_restrack.o
|
|
|
|
ifdef CONFIG_INFINIBAND_HNS_HIP06
|
|
hns-roce-hw-v1-objs := hns_roce_hw_v1.o $(hns-roce-objs)
|
|
obj-$(CONFIG_INFINIBAND_HNS) += hns-roce-hw-v1.o
|
|
endif
|
|
|
|
ifdef CONFIG_INFINIBAND_HNS_HIP08
|
|
hns-roce-hw-v2-objs := hns_roce_hw_v2.o hns_roce_hw_v2_dfx.o $(hns-roce-objs)
|
|
obj-$(CONFIG_INFINIBAND_HNS) += hns-roce-hw-v2.o
|
|
endif
|