]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: gpu: Add GPU buddy allocator bindings
authorJoel Fernandes <joelagnelf@nvidia.com>
Fri, 20 Mar 2026 04:57:10 +0000 (00:57 -0400)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 23 Mar 2026 20:41:47 +0000 (21:41 +0100)
commitb9616d9721bf8a56d5038e85d2ebbe0ec9d56a94
tree1105b3ed5f65e884f94cd9f463509f7c60a75f13
parentf9f0b4a1f35d39a1a2a2f8ec46eb7b81efc70a63
rust: gpu: Add GPU buddy allocator bindings

Add safe Rust abstractions over the Linux kernel's GPU buddy
allocator for physical memory management. The GPU buddy allocator
implements a binary buddy system useful for GPU physical memory
allocation. nova-core will use it for physical memory allocation.

Cc: Nikola Djukic <ndjukic@nvidia.com>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260320045711.43494-2-joelagnelf@nvidia.com
[ * Use doc-comments for GpuBuddyAllocMode methods and GpuBuddyGuard,
  * Fix comma splice in GpuBuddyParams::chunk_size doc-comment,
  * Remove redundant summary in GpuBuddy::new doc-comment,
  * Drop Rust helper for gpu_buddy_block_size().

    - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
MAINTAINERS
rust/bindings/bindings_helper.h
rust/helpers/gpu.c [new file with mode: 0644]
rust/helpers/helpers.c
rust/kernel/gpu.rs [new file with mode: 0644]
rust/kernel/gpu/buddy.rs [new file with mode: 0644]
rust/kernel/lib.rs