Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ toolchainopts = {'pic': True}

source_urls = ['https://github.com/ofiwg/libfabric/releases/download/v%(version)s']
sources = [SOURCE_TAR_BZ2]
patches = ['%(name)s-%(version)s_opx_hfi1_pre_cn5000.patch']
checksums = [
{'libfabric-2.0.0.tar.bz2': '1a8e40f1f331d6ee2e9ace518c0088a78c8a838968f8601c2b77fd012a7bf0f5'},
{'%(name)s-%(version)s_opx_hfi1_pre_cn5000.patch':
'9b97d7f84512ad7fe3bfc878f5fed80fcfa45ec904e9295246ebda99d85c3113'},
]

builddependencies = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Based on https://github.com/ofiwg/libfabric/pull/10691 by Cryolitia
prov/opx: use page_sizes[OFI_PAGE_SIZE]-1 instead of PAGE_MASK
Generated for release version 20.0.0 by julianmorillo
diff --git a/prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h b/prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h
index 2b57bc161..0bced48f0 100644
--- a/prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h
+++ b/prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h
@@ -38,6 +38,7 @@
#include <sys/mman.h>

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

/* Implementation PRE-CN5000 */
#ifdef OPX_PRE_CN5000
@@ -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)