Commit fcf463b9 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Jens Axboe
Browse files

types: move phys_vec definition to common header



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: default avatarLeon Romanovsky <leonro@nvidia.com>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 073b9bf9
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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)
+5 −0
Original line number Diff line number Diff line
@@ -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;

/*