]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
types: move phys_vec definition to common header
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 17 Dec 2025 09:41:24 +0000 (11:41 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Jan 2026 12:47:54 +0000 (05:47 -0700)
Move the struct phys_vec definition from block/blk-mq-dma.c to
include/linux/types.h to make it available for use across the kernel.

The phys_vec structure represents a physical address range with a
length, which is used by the new physical address-based DMA mapping
API. This structure is already used by the block layer and will be
needed for DMA phys API users.

Moving this definition to types.h provides a centralized location
for this common data structure and eliminates code duplication
across subsystems that need to work with physical address ranges.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-dma.c
include/linux/types.h

index a2bedc8f8666d540be2965f265a0f2f3f97c8746..752060d7261cbe0cd7442eea1798a9ff525a00b9 100644 (file)
@@ -6,11 +6,6 @@
 #include <linux/blk-mq-dma.h>
 #include "blk.h"
 
-struct phys_vec {
-       phys_addr_t     paddr;
-       size_t          len;
-};
-
 static bool __blk_map_iter_next(struct blk_map_iter *iter)
 {
        if (iter->iter.bi_size)
index d4437e9c452c5a158a9ae84e65ae8c61c2493918..d673747eda8a18c786dd2e3a6d37921d0a28006d 100644 (file)
@@ -171,6 +171,11 @@ typedef u64 phys_addr_t;
 typedef u32 phys_addr_t;
 #endif
 
+struct phys_vec {
+       phys_addr_t     paddr;
+       size_t          len;
+};
+
 typedef phys_addr_t resource_size_t;
 
 /*