-
Notifications
You must be signed in to change notification settings - Fork 1.1k
linux: Add devmem constants and structs #4299
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation LGTM. Could you add permalinks to the headers in the PR description and fix the style failure?
Thanks! @rustbot label +stable-nominated |
ef07ab9
to
53d0fed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are SO_RESERVE_MEM
and similar available on sparc? CI seems to think they aren't. If they are more recent, the test crate's build script will need to be updated.
My guess is that there will one more architecture that this PR will be break. |
The devmem constants requires headers >= 6.12 on gnu libc. Musl hardcodes these constants into "sys/socket.h", which are not yet present. For reference: https://elixir.bootlin.com/linux/v6.13.5/source/include/uapi/asm-generic/socket.h#L142 Signed-off-by: Pedro Tammela <[email protected]>
For reference: https://elixir.bootlin.com/linux/v6.13.5/source/include/uapi/linux/uio.h#L23 Signed-off-by: Pedro Tammela <[email protected]>
53d0fed
to
4985e60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like things are passing now, thanks for the CI fix!
The devmem constants requires headers >= 6.12 on gnu libc. Musl hardcodes these constants into "sys/socket.h", which are not yet present. For reference: https://elixir.bootlin.com/linux/v6.13.5/source/include/uapi/asm-generic/socket.h#L142 Signed-off-by: Pedro Tammela <[email protected]> (backport <rust-lang#4299>) (cherry picked from commit ae98edd)
For reference: https://elixir.bootlin.com/linux/v6.13.5/source/include/uapi/linux/uio.h#L23 Signed-off-by: Pedro Tammela <[email protected]> (backport <rust-lang#4299>) (cherry picked from commit 4985e60)
Description
Adds devmem constants and structs. Devmem was merged recently (6.12).
I had also add all the other missing
SO_
constants for completion.As usual, musl is way behind (even on 1.2) so all of these will be skipped there.
Sources
https://github.com/torvalds/linux/blob/c0d35086a21b8d5536da5029fd76b9aeecf3217d/include/uapi/asm-generic/socket.h#L125
https://github.com/torvalds/linux/blob/c0d35086a21b8d5536da5029fd76b9aeecf3217d/include/uapi/linux/uio.h#L23
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI