From nobody Sun Oct 5 14:33:09 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 1DE5827145F; Mon, 4 Aug 2025 13:01:27 +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=1754312488; cv=none; b=jYKE+fL0xQ742m3diHvLuAuTd0nyadYe0hB3xMcK1Lyuc+y9YHj2vsdXHcNi6vfmAq/DhYGXbh3lpVDKszXxbcrhRLYhtiXL9U2d3JdGO4Fq7mwJRor7/lCK7JPj4hFIF5sQpSh8OFjnEMk89tbw/goq3IaX3AVpwr4dfE4m4bg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754312488; c=relaxed/simple; bh=WJztkfF0BW2A+ySSaoquKg9YWNFPhQS7np0spIG94dM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tfPUYq4Dfv8ft90ZzB1yPzgq6CE7SXgBiO1YVaVXCh7NN9C0v1ONMrF2udIZMorJMalVC+MlBa3jzk8eDbJzLO9qiwzefXPHNsIXrDE9tBPH5i89fe/EnQXgbFZKr/DFjtpHAMFLqz6JMfDH0wj37FQeBIw26WKed2iwj4WEag4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U6NzdtAJ; 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="U6NzdtAJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7276EC4CEE7; Mon, 4 Aug 2025 13:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754312487; bh=WJztkfF0BW2A+ySSaoquKg9YWNFPhQS7np0spIG94dM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6NzdtAJjvKqDoK99gNW74qBu86eRI6rmFzBpM7IVvzJUQY7rqGAQN18dEvkubRN+ Y+m2Fo7Oc72hbCrN1FXqElv4W8T7JunoHZHZdBliXv/iTcRC1rPep8PUQrlubuEuZr cFwuGmfnVgmrhV2o9d1afCl0k/XMtlNsC9nLQmxEP2s24dFZ8n2RnfdUPpO2rn7dOB MoocxgPp8LpCToe04kCbNp1Hzh4v8k8j5zfoFKNLnSjxSqf3tAvHQoqcLLzkSvxwBO AgExQp/Jj/LmCw9WJJmASCHqMVlKFvPl6JCk9IDacM3Sbg4LjdbUwhrCzOddAfA3am cOY6O/a9VKDKg== From: Leon Romanovsky To: Alex Williamson Cc: Leon Romanovsky , Jason Gunthorpe , Andrew Morton , Bjorn Helgaas , =?UTF-8?q?Christian=20K=C3=B6nig?= , Christoph Hellwig , 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 v1 06/10] types: move phys_vec definition to common header Date: Mon, 4 Aug 2025 16:00:41 +0300 Message-ID: X-Mailer: git-send-email 2.50.1 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.50.1