IB/hns: Support compile test for hns RoCE driver
authorMatan Barak <matanb@mellanox.com>
Thu, 8 Jun 2017 14:23:50 +0000 (17:23 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 28 Jul 2017 18:48:26 +0000 (14:48 -0400)
Compiling the hns RoCE driver requires ARM architecture.
In order to simplify development of IB/core, support
compile test. Add the necessary includes for that too.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/Kconfig
drivers/infiniband/hw/hns/hns_roce_alloc.c
drivers/infiniband/hw/hns/hns_roce_mr.c

index e1a6e055cd607f7c5ec80787e743c4416e9dac01..cbe6b51394fd47e23014d9042545949522e51e50 100644 (file)
@@ -1,7 +1,7 @@
 config INFINIBAND_HNS
        tristate "HNS RoCE Driver"
        depends on NET_VENDOR_HISILICON
-       depends on ARM64 && HNS && HNS_DSAF && HNS_ENET
+       depends on (ARM64 || COMPILE_TEST) && HNS && HNS_DSAF && HNS_ENET
        ---help---
          This is a RoCE/RDMA driver for the Hisilicon RoCE engine. The engine
          is used in Hisilicon Hi1610 and more further ICT SoC.
index 605962f2828cbb8990765dff8b2741f7049b8012..e1b433cdd5e24797c569d93cd924ee4379d1b805 100644 (file)
@@ -32,6 +32,7 @@
  */
 
 #include <linux/platform_device.h>
+#include <linux/vmalloc.h>
 #include "hns_roce_device.h"
 
 int hns_roce_bitmap_alloc(struct hns_roce_bitmap *bitmap, unsigned long *obj)
index 80fc01ffd8bdd48d552b4919a7eda668efe98fa4..e387360e378099ac71e986fbab04dc174dd03c72 100644 (file)
@@ -32,6 +32,7 @@
  */
 
 #include <linux/platform_device.h>
+#include <linux/vmalloc.h>
 #include <rdma/ib_umem.h>
 #include "hns_roce_device.h"
 #include "hns_roce_cmd.h"