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. -- Doug Ledford <dledford@xxxxxxxxxx> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Attachment:
signature.asc
Description: This is a digitally signed message part