From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Tull Subject: Re: [PATCH v5 28/28] fpga: dfl: afu: add DFL_FPGA_PORT_DMA_MAP/UNMAP ioctls support Date: Wed, 6 Jun 2018 11:09:23 -0500 Message-ID: References: <1525229431-3087-1-git-send-email-hao.wu@intel.com> <1525229431-3087-29-git-send-email-hao.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <1525229431-3087-29-git-send-email-hao.wu@intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Wu Hao Cc: Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel , linux-api@vger.kernel.org, "Kang, Luwei" , "Zhang, Yi Z" , Tim Whisonant , Enno Luebbers , Shiva Rao , Christopher Rauer , Xiao Guangrong List-Id: linux-api@vger.kernel.org On Tue, May 1, 2018 at 9:50 PM, Wu Hao wrote: Hi Hao, > DMA memory regions are required for Accelerated Function Unit (AFU) usage. > These two ioctls allow user space applications to map user memory regions > for dma, and unmap them after use. Iova is returned from driver to user > space application via DFL_FPGA_PORT_DMA_MAP ioctl. Application needs to unmap > it after use, otherwise, driver will unmap them in device file release > operation. > > Each AFU has its own rb tree to keep track of its mapped DMA regions. > > Ioctl interfaces: > * DFL_FPGA_PORT_DMA_MAP > Do the dma mapping per user_addr and length which provided by user. > Return iova in provided struct dfl_fpga_port_dma_map. > > * DFL_FPGA_PORT_DMA_UNMAP > Unmap the dma region per iova provided by user. > > Signed-off-by: Tim Whisonant > Signed-off-by: Enno Luebbers > Signed-off-by: Shiva Rao > Signed-off-by: Christopher Rauer > Signed-off-by: Xiao Guangrong > Signed-off-by: Wu Hao Acked-by: Alan Tull