Message ID | 20190724065443.53068-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | a07fc0bb483eb24444cebd59a8112ce6e6964c48 |
Headers | show |
Series | RDMA/hns: Fix build error | expand |
On Wed, Jul 24, 2019 at 02:54:43PM +0800, YueHaibing wrote: > If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, > but INFINIBAND_HNS is y, building fails: > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': > hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': > hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' > > Also if INFINIBAND_HNS_HIP06 is selected and HNS_DSAF > is m, but INFINIBAND_HNS is y, building fails: > > drivers/infiniband/hw/hns/hns_roce_hw_v1.o: In function `hns_roce_v1_reset': > hns_roce_hw_v1.c:(.text+0x39fa): undefined reference to `hns_dsaf_roce_reset' > hns_roce_hw_v1.c:(.text+0x3a25): undefined reference to `hns_dsaf_roce_reset' > > Reported-by: Hulk Robot <hulkci@huawei.com> > Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") > Fixes: 08805fdbeb2d ("RDMA/hns: Split hw v1 driver from hns roce driver") > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > drivers/infiniband/hw/hns/Kconfig | 6 +++--- > drivers/infiniband/hw/hns/Makefile | 8 ++------ > 2 files changed, 5 insertions(+), 9 deletions(-) did you test this approach with CONFIG_MODULES=n? Jason
On 2019/7/24 19:32, Jason Gunthorpe wrote: > On Wed, Jul 24, 2019 at 02:54:43PM +0800, YueHaibing wrote: >> If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, >> but INFINIBAND_HNS is y, building fails: >> >> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': >> hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' >> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': >> hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' >> >> Also if INFINIBAND_HNS_HIP06 is selected and HNS_DSAF >> is m, but INFINIBAND_HNS is y, building fails: >> >> drivers/infiniband/hw/hns/hns_roce_hw_v1.o: In function `hns_roce_v1_reset': >> hns_roce_hw_v1.c:(.text+0x39fa): undefined reference to `hns_dsaf_roce_reset' >> hns_roce_hw_v1.c:(.text+0x3a25): undefined reference to `hns_dsaf_roce_reset' >> >> Reported-by: Hulk Robot <hulkci@huawei.com> >> Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") >> Fixes: 08805fdbeb2d ("RDMA/hns: Split hw v1 driver from hns roce driver") >> Signed-off-by: YueHaibing <yuehaibing@huawei.com> >> drivers/infiniband/hw/hns/Kconfig | 6 +++--- >> drivers/infiniband/hw/hns/Makefile | 8 ++------ >> 2 files changed, 5 insertions(+), 9 deletions(-) > > did you test this approach with CONFIG_MODULES=n? Yes, I test it, it works now. > > Jason > > . >
On Wed, 2019-07-24 at 08:32 -0300, Jason Gunthorpe wrote: > On Wed, Jul 24, 2019 at 02:54:43PM +0800, YueHaibing wrote: > > If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, > > but INFINIBAND_HNS is y, building fails: > > > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function > > `hns_roce_hw_v2_exit': > > hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to > > `hnae3_unregister_client' > > drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function > > `hns_roce_hw_v2_init': > > hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to > > `hnae3_register_client' > > > > Also if INFINIBAND_HNS_HIP06 is selected and HNS_DSAF > > is m, but INFINIBAND_HNS is y, building fails: > > > > drivers/infiniband/hw/hns/hns_roce_hw_v1.o: In function > > `hns_roce_v1_reset': > > hns_roce_hw_v1.c:(.text+0x39fa): undefined reference to > > `hns_dsaf_roce_reset' > > hns_roce_hw_v1.c:(.text+0x3a25): undefined reference to > > `hns_dsaf_roce_reset' > > > > Reported-by: Hulk Robot <hulkci@huawei.com> > > Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 > > RoCE") > > Fixes: 08805fdbeb2d ("RDMA/hns: Split hw v1 driver from hns roce > > driver") > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > > drivers/infiniband/hw/hns/Kconfig | 6 +++--- > > drivers/infiniband/hw/hns/Makefile | 8 ++------ > > 2 files changed, 5 insertions(+), 9 deletions(-) > > did you test this approach with CONFIG_MODULES=n? This version of the patch looks like the right fix. Applying to for-rc, thanks.
diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig index 8bf847b..5478219 100644 --- a/drivers/infiniband/hw/hns/Kconfig +++ b/drivers/infiniband/hw/hns/Kconfig @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only config INFINIBAND_HNS - tristate "HNS RoCE Driver" + bool "HNS RoCE Driver" depends on NET_VENDOR_HISILICON depends on ARM64 || (COMPILE_TEST && 64BIT) ---help--- @@ -11,7 +11,7 @@ config INFINIBAND_HNS To compile HIP06 or HIP08 driver as module, choose M here. config INFINIBAND_HNS_HIP06 - bool "Hisilicon Hip06 Family RoCE support" + tristate "Hisilicon Hip06 Family RoCE support" depends on INFINIBAND_HNS && HNS && HNS_DSAF && HNS_ENET ---help--- RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip06 and @@ -21,7 +21,7 @@ config INFINIBAND_HNS_HIP06 module will be called hns-roce-hw-v1 config INFINIBAND_HNS_HIP08 - bool "Hisilicon Hip08 Family RoCE support" + tristate "Hisilicon Hip08 Family RoCE support" depends on INFINIBAND_HNS && PCI && HNS3 ---help--- RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip08 SoC. diff --git a/drivers/infiniband/hw/hns/Makefile b/drivers/infiniband/hw/hns/Makefile index e105945..449a2d8 100644 --- a/drivers/infiniband/hw/hns/Makefile +++ b/drivers/infiniband/hw/hns/Makefile @@ -9,12 +9,8 @@ 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 +obj-$(CONFIG_INFINIBAND_HNS_HIP06) += hns-roce-hw-v1.o -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 +obj-$(CONFIG_INFINIBAND_HNS_HIP08) += hns-roce-hw-v2.o
If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, but INFINIBAND_HNS is y, building fails: drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' Also if INFINIBAND_HNS_HIP06 is selected and HNS_DSAF is m, but INFINIBAND_HNS is y, building fails: drivers/infiniband/hw/hns/hns_roce_hw_v1.o: In function `hns_roce_v1_reset': hns_roce_hw_v1.c:(.text+0x39fa): undefined reference to `hns_dsaf_roce_reset' hns_roce_hw_v1.c:(.text+0x3a25): undefined reference to `hns_dsaf_roce_reset' Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") Fixes: 08805fdbeb2d ("RDMA/hns: Split hw v1 driver from hns roce driver") Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/infiniband/hw/hns/Kconfig | 6 +++--- drivers/infiniband/hw/hns/Makefile | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-)