Skip to content

Commit

Permalink
prov/opx: use page_sizes[OFI_PAGE_SIZE]-1 instead of PAGE_MASK
Browse files Browse the repository at this point in the history
Fix: #10661
Signed-off-by: PukNgae Cryolitia <Cryolitia@gmail.com>
  • Loading branch information
Cryolitia authored and j-xiong committed Jan 11, 2025
1 parent 9f5b600 commit 2a320f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <sys/mman.h>

#include "fi_opx_hfi1.h"
#include "ofi_mem.h"

/* Implementation PRE-CN5000 */
#ifdef OPX_PRE_CN5000
Expand Down Expand Up @@ -116,7 +117,7 @@ int opx_get_port(struct hfi1_user_info_dep *uinfo)

#define OPX_HFI1_MMAP_MAGIC 0xdabbad00

#define opx_offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
#define opx_offset_in_page(p) ((unsigned long)(p) & (page_sizes[OFI_PAGE_SIZE]-1))

#define OPX_HFI1_MMAP_TOKEN_SET(field, val) \
(((val) & OPX_HFI1_MMAP_##field##_MASK) << OPX_HFI1_MMAP_##field##_SHIFT)
Expand Down

0 comments on commit 2a320f1

Please sign in to comment.