镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

rust: kernel: add a function that that returns a reference to the IoPort Resource - #1199

Open
alexandruradovici wants to merge 1 commit into
Rust-for-Linux:rust-nextfrom
alexandruradovici:rust-resource-ioport
Open

alexandruradovici wants to merge 1 commit into
Rust-for-Linux:rust-nextfrom
alexandruradovici:rust-resource-ioport

Conversation

@alexandruradovici

Copy link
Copy Markdown

This pull request adds a function to kernel::io::resource that returns a reference to a Resource that points to the kernel's IO Ports .

There does not seem to be any other way to reserve an IO Port range, as Resource::from_raw is private. This was inspired by https://github.com/AsahiLinux/linux/blob/5ce014f7fa18021227bf46bd155b4ccf375a9dd3/rust/kernel/io/resource.rs#L13-L18.

I am not sure that this is safe and any feedback is welcome.

Signed-off-by: Alexandru Radovici alexandru.radovici@wyliodrin.com

@alexandruradovici alexandruradovici changed the title Add a function that that returns a reference to the IoPort Resource rust: kernel: add a function that that returns a reference to the IoPort Resource Oct 26, 2025
@ojeda

ojeda commented Oct 27, 2025

Copy link
Copy Markdown
Member

Linux uses a patch-based workflow, i.e. GitHub PRs are not used. Please see https://rust-for-linux.com/contributing. Thanks!

@ojeda
ojeda force-pushed the rust-next branch 4 times, most recently from 7c678ba to 438700e Compare April 3, 2026 21:23
@ojeda
ojeda force-pushed the rust-next branch 3 times, most recently from 4fedd76 to 759da9e Compare June 9, 2026 02:16
@ojeda
ojeda force-pushed the rust-next branch 6 times, most recently from 4cb8438 to d8973c4 Compare August 10, 2026 05:58
@ojeda
ojeda force-pushed the rust-next branch 4 times, most recently from a417b54 to 47f2715 Compare August 13, 2026 11:41

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants