Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prov/opx: PAGE_MASK undefined on RISC-V #10661

Open
Cryolitia opened this issue Dec 29, 2024 · 1 comment
Open

prov/opx: PAGE_MASK undefined on RISC-V #10661

Cryolitia opened this issue Dec 29, 2024 · 1 comment

Comments

@Cryolitia
Copy link

Describe the bug
After #10308 , it seems that PAGE_MASK in opx_hfi1_pre_cn5000.h is also undefined, which blocks the build on RISC-V.

https://github.com/ofiwg/libfabric/blob/f893f5f88eb5cf0f4cf4e0154edc91e0b6f8b7bf/prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h#L119C54-L119C63

To Reproduce
Steps to reproduce the behavior:

Build it on Arch Linux RISC-V

Expected behavior
Success to build.

Should it be just replaced with page_sizes[OFI_PAGE_SIZE] - 1 or other? I'm not familiar with it.

Output

In file included from prov/opx/src/fi_opx_hfi1.c:50:
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h: In function 'opx_hfi_mmap_rheq':
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h:119:56: error: 'PAGE_MASK' undeclared (first use in this function); did you mean 'GENMASK'?
  119 | #define opx_offset_in_page(p)   ((unsigned long)(p) & ~PAGE_MASK)
      |                                                        ^~~~~~~~~
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h:122:12: note: in definition of macro 'OPX_HFI1_MMAP_TOKEN_SET'
  122 |         (((val) & OPX_HFI1_MMAP_##field##_MASK) << OPX_HFI1_MMAP_##field##_SHIFT)
      |            ^~~
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h:132:42: note: in expansion of macro 'opx_offset_in_page'
  132 |         OPX_HFI1_MMAP_TOKEN_SET(OFFSET, (opx_offset_in_page(addr))))
      |                                          ^~~~~~~~~~~~~~~~~~
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h:142:27: note: in expansion of macro 'OPX_HFI1_MMAP_TOKEN'
  142 |         __off64_t token = OPX_HFI1_MMAP_TOKEN(OPX_RCV_RHEQ,
      |                           ^~~~~~~~~~~~~~~~~~~
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h:119:56: note: each undeclared identifier is reported only once for each function it appears in
  119 | #define opx_offset_in_page(p)   ((unsigned long)(p) & ~PAGE_MASK)
      |                                                        ^~~~~~~~~
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h:122:12: note: in definition of macro 'OPX_HFI1_MMAP_TOKEN_SET'
  122 |         (((val) & OPX_HFI1_MMAP_##field##_MASK) << OPX_HFI1_MMAP_##field##_SHIFT)
      |            ^~~
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h:132:42: note: in expansion of macro 'opx_offset_in_page'
  132 |         OPX_HFI1_MMAP_TOKEN_SET(OFFSET, (opx_offset_in_page(addr))))
      |                                          ^~~~~~~~~~~~~~~~~~
./prov/opx/include/rdma/opx/opx_hfi1_pre_cn5000.h:142:27: note: in expansion of macro 'OPX_HFI1_MMAP_TOKEN'
  142 |         __off64_t token = OPX_HFI1_MMAP_TOKEN(OPX_RCV_RHEQ,
      |                           ^~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:30003: prov/opx/src/src_libfabric_la-fi_opx_hfi1.lo] Error 1
make[1]: Leaving directory '/build/libfabric/src/libfabric-2.0.0'
make: *** [Makefile:9306: all] Error 2

Environment:
Arch Linux RISC-V

Additional context
Add any other context about the problem here.

@Cryolitia Cryolitia added the bug label Dec 29, 2024
@j-xiong
Copy link
Contributor

j-xiong commented Jan 2, 2025

Yes, I think you can replace ~PAGE_MASK with page_sizes[OFI_PAGE_SIZE]-1.

@charlesshereda Can you confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants