On 2018/5/17 4:04, Doug Ledford wrote: > On Wed, 2018-05-16 at 13:24 -0600, Jason Gunthorpe wrote: >> On Fri, May 11, 2018 at 04:31:23PM +0800, Yixian Liu wrote: >>> This patch adds the support of 64KB page size for hip08 >>> in kernel. >>> >>> Signed-off-by: Yixian Liu <liuyixian@xxxxxxxxxx> >>> drivers/infiniband/hw/hns/hns_roce_device.h | 3 +++ >>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 36 ++++++++++++++++------------- >>> drivers/infiniband/hw/hns/hns_roce_mr.c | 6 ----- >>> 3 files changed, 23 insertions(+), 22 deletions(-) >>> >>> diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h >>> index fb305b7..53c2f1b 100644 >>> +++ b/drivers/infiniband/hw/hns/hns_roce_device.h >>> @@ -100,6 +100,9 @@ >>> #define SERV_TYPE_UC 2 >>> #define SERV_TYPE_UD 3 >>> >>> +/* Configure to HW for PAGE_SIZE larger than 4KB */ >>> +#define PG_SHIFT_OFFSET (PAGE_SHIFT - 12) >> >> What happens if the kernel is built with PAGE_SHIFT < 12? >> >> I'm guessing this needs a BUILD_BUG_ON as this HW cannot support that?? > > I don't think the kernel supports less than a 4k page size. Using git > grep "#define PAGE_SIZE" returns all the current possible page size > values on all arches and none that I saw were less than 12. > That's right. I also think there is no case for PAGE_SHIFT less than 12. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html