From nobody Thu Oct 2 02:06:22 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C97B62376F7; Thu, 25 Sep 2025 13:18:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758806325; cv=none; b=ppLuKSB8rDiQvHmjM9IA3ePWomyyklsiNi61SM8zt9wftBmlRN3O4JdSUbkv0waYam5nZnA4/AD9TYICv3z/33L6LnTG/dTf81JqGgJ7x3sZqcUBftbkcAjkQZnf5vTqwgw+Rz9zDakwRhxVRSvr2Zzk9H4W1bfyvyqrBI0KD7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758806325; c=relaxed/simple; bh=4Zq6h9bZhtbBadNPN71BbedaIVCHib6EpkAfWXyEd4A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WqFEtHOErObtgd1oVIZFUHT5tgbpD9kyySXVJI3LD5hTJ82XcSuaOUxPOvrk46mk2gd8LxDn54WtpnRyOzpUDCbo23VevUkh3zg4b+M4tox1VCCKlhYrq8xtyEH3/rDiI3LQbgEsRrpKi+4yLDsJBT/vRbQl0F6Fk+cSy2PGG5s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bzKG8rz/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bzKG8rz/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 938F6C4CEF5; Thu, 25 Sep 2025 13:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758806325; bh=4Zq6h9bZhtbBadNPN71BbedaIVCHib6EpkAfWXyEd4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bzKG8rz/enFK/kA4HnAGYMksgeq61FavbJCJcIx5n3L9m8euwOV7Eo/WkBc9Kc21/ EFoUq9FbsgK1yYJswKmN8/9l0vK+3Cjd/U8ww8dKSs1guV0ZUjZePE/+XumsZtA2Dk Rw5Cgsn3j+mzndkuY3fms2ZnFStMKn0PNNmWYuZXecSbmFpcE4aWb2q3RqWm2gB2yg vMmg7IaKXLNslgkNeYTHTpCOYb7KCBWq+x0dZ2uTxR01tW1q4zPHBY1FrtTc8It3s4 qoF5VTYtcIFgmzTvu2fN4nxp9hIxgvJ27TG9zFguHAUHswsjrU8HJc+P2FNuz7+4WF 6GprLm0nARPcg== From: Leon Romanovsky To: Alex Williamson Cc: Leon Romanovsky , Jason Gunthorpe , Andrew Morton , Bjorn Helgaas , =?UTF-8?q?Christian=20K=C3=B6nig?= , dri-devel@lists.freedesktop.org, iommu@lists.linux.dev, Jens Axboe , Joerg Roedel , kvm@vger.kernel.org, linaro-mm-sig@lists.linaro.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, Logan Gunthorpe , Marek Szyprowski , Robin Murphy , Sumit Semwal , Vivek Kasireddy , Will Deacon Subject: [PATCH v3 05/10] types: move phys_vec definition to common header Date: Thu, 25 Sep 2025 16:14:33 +0300 Message-ID: X-Mailer: git-send-email 2.51.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Leon Romanovsky 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 by upcoming VFIO patches for dma-buf operations. 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 --- block/blk-mq-dma.c | 5 ----- include/linux/types.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block/blk-mq-dma.c b/block/blk-mq-dma.c index 430e51ec494a6..8d2646ab27953 100644 --- a/block/blk-mq-dma.c +++ b/block/blk-mq-dma.c @@ -5,11 +5,6 @@ #include #include "blk.h" =20 -struct phys_vec { - phys_addr_t paddr; - u32 len; -}; - static bool blk_map_iter_next(struct request *req, struct req_iterator *it= er, struct phys_vec *vec) { diff --git a/include/linux/types.h b/include/linux/types.h index 6dfdb8e8e4c35..2bc56681b2e62 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -170,6 +170,11 @@ typedef u64 phys_addr_t; typedef u32 phys_addr_t; #endif =20 +struct phys_vec { + phys_addr_t paddr; + u32 len; +}; + typedef phys_addr_t resource_size_t; =20 /* --=20 2.51.0