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

rust: kernel: add a function that that returns a reference to the IoPort Resource#1199
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 比较 April 3, 2026 21:23
@ojeda
ojeda force-pushed the rust-next branch 3 times, most recently from 4fedd76 to 759da9e 比较 June 9, 2026 02:16
@ojeda
ojeda force-pushed the rust-next branch 6 times, most recently from 4cb8438 to d8973c4 比较 August 10, 2026 05:58
@ojeda
ojeda force-pushed the rust-next branch 4 times, most recently from a417b54 to 47f2715 比较 August 13, 2026 11:41
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

None yet

Development

Successfully merging this pull request may close these issues.

2 participants