From nobody Thu Oct 2 21:41:03 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 A15A4320A0E; Thu, 11 Sep 2025 11:34:01 +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=1757590441; cv=none; b=kPkTZ+OB6zGbfWunDLqaZZcgElnLLdV7YJ1Zvpd0YjDaXdS8quY2TOoh/UqdHtDg5BGVELoHy4asduyej3IOkPUvCcSxSJeZ8f97Ui2Bvv6JloLb/Cu5HiBAxc5EpI3QFiF8EcfxvusAe+cB0c2++4C1UzBcr0DQ3Cn2pUXKCRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757590441; c=relaxed/simple; bh=4Zq6h9bZhtbBadNPN71BbedaIVCHib6EpkAfWXyEd4A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MrvTjXeNgl2FlqRAQAUc+xM9KOIOEYIyGzuvoTsCt8K/6S+H02iwTBFRPo3Um9fkFsq9E9+cBLOeOac9x5UVrT1Lr9x41AZVYnd7LvsA4u3kZVrP/tUY6z0GqXvuaBlq3LtU3+nCYnWjUD3TowLomvLIkgDxB4uKo+JwkqLBrUQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=POssaAIm; 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="POssaAIm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BCF4C4CEF1; Thu, 11 Sep 2025 11:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757590441; bh=4Zq6h9bZhtbBadNPN71BbedaIVCHib6EpkAfWXyEd4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=POssaAImuo77Xkm4xrUgHRmzE5nrnqsVY7qXWmRbo8QfaWXz9XAXmJDS3VzukCFi2 Glgwc4FjGRgiUvcuxmGo1LMNSDWBUv1kOZcAnhqlS44OSnvfSA9snuKJR/3qS7RJ2O 0iPVYxKpYtNLMdHBsq1HAcrPoPmECATRkIljjJJACnE4KpArqZLjlS2fPv8gItmHe0 6O60WlblZyoFp+SPvfZBk/sxpDVAjDsDqn8ieQy8M53QlizFKbwe5TED06eq7Iq0mB 93iYLrxNFssc8Xre6IRujiO5ImaWLdMIFMXqDrVrMAODCCVpEeIYnEhvGgq5jXfJJ0 fKJi4hKoNpDgw== 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 v2 05/10] types: move phys_vec definition to common header Date: Thu, 11 Sep 2025 14:33:09 +0300 Message-ID: <84148ed07c52b5220524f3a4a7a81744afe7a52b.1757589589.git.leon@kernel.org> 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