Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754050Ab0GMIby (ORCPT ); Tue, 13 Jul 2010 04:31:54 -0400 Received: from sh.osrg.net ([192.16.179.4]:51714 "EHLO sh.osrg.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753237Ab0GMIbu (ORCPT ); Tue, 13 Jul 2010 04:31:50 -0400 Date: Tue, 13 Jul 2010 17:30:43 +0900 To: alan@lxorguk.ukuu.org.uk Cc: fujita.tomonori@lab.ntt.co.jp, zpfeffer@codeaurora.org, joro@8bytes.org, dwalker@codeaurora.org, andi@firstfloor.org, randy.dunlap@oracle.com, mel@csn.ul.ie, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC 3/3] mm: iommu: The Virtual Contiguous Memory Manager From: FUJITA Tomonori In-Reply-To: <20100713092012.7c1fe53e@lxorguk.ukuu.org.uk> References: <4C3BFDD3.8040209@codeaurora.org> <20100713145852C.fujita.tomonori@lab.ntt.co.jp> <20100713092012.7c1fe53e@lxorguk.ukuu.org.uk> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20100713173028M.fujita.tomonori@lab.ntt.co.jp> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (sh.osrg.net [192.16.179.4]); Tue, 13 Jul 2010 17:30:47 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1121 Lines: 21 On Tue, 13 Jul 2010 09:20:12 +0100 Alan Cox wrote: > > Why video4linux can't use the DMA API? Doing DMA with vmalloc'ed > > buffers is a thing that we should avoid (there are some exceptions > > like xfs though). > > Vmalloc is about the only API for creating virtually linear memory areas. > The video stuff really needs that to avoid lots of horrible special cases > when doing buffer processing and the like. > > Pretty much each driver using it has a pair of functions 'rvmalloc' and > 'rvfree' so given a proper "vmalloc_for_dma()" type interface can easily > be switched We already have helper functions for DMA with vmap pages, flush_kernel_vmap_range and invalidate_kernel_vmap_range. I think that the current DMA API with the above helper functions should work well drivers that want virtually linear large memory areas (such as xfs). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/