Message ID | 1496931830-116773-1-git-send-email-matanb@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
在 2017/6/8 22:23, Matan Barak 写道: > 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> > --- > > Hi Lijun and Wei, > > This simple patch allow the hns RoCE driver to be compiled in other > architectures other than ARM. This simplifies testing IB/core and > avoids unnecessary breaks of your driver. > Since I don't have a hns hardware, I can't test this, so please do. > > Regards, > Matan ok, that is good Thanks Lijun Ou > drivers/infiniband/hw/hns/Kconfig | 2 +- > drivers/infiniband/hw/hns/hns_roce_alloc.c | 1 + > drivers/infiniband/hw/hns/hns_roce_mr.c | 1 + > 3 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig > index e1a6e05..cbe6b51 100644 > --- a/drivers/infiniband/hw/hns/Kconfig > +++ b/drivers/infiniband/hw/hns/Kconfig > @@ -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. > diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers/infiniband/hw/hns/hns_roce_alloc.c > index 605962f..e1b433c 100644 > --- a/drivers/infiniband/hw/hns/hns_roce_alloc.c > +++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c > @@ -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) > diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c b/drivers/infiniband/hw/hns/hns_roce_mr.c > index 80fc01f..e387360 100644 > --- a/drivers/infiniband/hw/hns/hns_roce_mr.c > +++ b/drivers/infiniband/hw/hns/hns_roce_mr.c > @@ -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" -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, 2017-06-10 at 16:42 +0800, oulijun wrote: > 在 2017/6/8 22:23, Matan Barak 写道: > > 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> > > --- > > > > Hi Lijun and Wei, > > > > This simple patch allow the hns RoCE driver to be compiled in other > > architectures other than ARM. This simplifies testing IB/core and > > avoids unnecessary breaks of your driver. > > Since I don't have a hns hardware, I can't test this, so please do. > > > > Regards, > > Matan > > ok, that is good I originally had this in my for-next stuff, but it caused several issues during 0day testing so I yanked it. The kbuild test robot found three different issues and suggested fixes (these items weren't caused by this patch, but just showed up during compile tests) and there was one additional issue that cause a build failure. I fixed that up. So this is now back in. > > - 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. > > diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c > > b/drivers/infiniband/hw/hns/hns_roce_alloc.c > > index 605962f..e1b433c 100644 > > --- a/drivers/infiniband/hw/hns/hns_roce_alloc.c > > +++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c > > @@ -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) > > diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c > > b/drivers/infiniband/hw/hns/hns_roce_mr.c > > index 80fc01f..e387360 100644 > > --- a/drivers/infiniband/hw/hns/hns_roce_mr.c > > +++ b/drivers/infiniband/hw/hns/hns_roce_mr.c > > @@ -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" > > >
diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig index e1a6e05..cbe6b51 100644 --- a/drivers/infiniband/hw/hns/Kconfig +++ b/drivers/infiniband/hw/hns/Kconfig @@ -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. diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers/infiniband/hw/hns/hns_roce_alloc.c index 605962f..e1b433c 100644 --- a/drivers/infiniband/hw/hns/hns_roce_alloc.c +++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c @@ -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) diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c b/drivers/infiniband/hw/hns/hns_roce_mr.c index 80fc01f..e387360 100644 --- a/drivers/infiniband/hw/hns/hns_roce_mr.c +++ b/drivers/infiniband/hw/hns/hns_roce_mr.c @@ -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"
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> --- Hi Lijun and Wei, This simple patch allow the hns RoCE driver to be compiled in other architectures other than ARM. This simplifies testing IB/core and avoids unnecessary breaks of your driver. Since I don't have a hns hardware, I can't test this, so please do. Regards, Matan drivers/infiniband/hw/hns/Kconfig | 2 +- drivers/infiniband/hw/hns/hns_roce_alloc.c | 1 + drivers/infiniband/hw/hns/hns_roce_mr.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)