Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262079AbUFVKtb (ORCPT ); Tue, 22 Jun 2004 06:49:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262256AbUFVKt1 (ORCPT ); Tue, 22 Jun 2004 06:49:27 -0400 Received: from cantor.suse.de ([195.135.220.2]:3974 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S262079AbUFVKtV (ORCPT ); Tue, 22 Jun 2004 06:49:21 -0400 Date: Tue, 22 Jun 2004 12:48:39 +0200 Message-ID: From: Takashi Iwai To: Russell King Cc: Matt Porter , Jamey Hicks , Ian Molton , linux-kernel@vger.kernel.org, greg@kroah.com, tony@atomide.com, david-b@pacbell.net, joshua@joshuawise.com Subject: Re: DMA API issues In-Reply-To: <20040622000838.B7802@flint.arm.linux.org.uk> References: <20040618175902.778e616a.spyro@f2s.com> <20040618110721.B3851@home.com> <40D3356E.8040800@hp.com> <20040618122112.D3851@home.com> <20040618204322.C17516@flint.arm.linux.org.uk> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1750 Lines: 44 At Tue, 22 Jun 2004 00:08:38 +0100, Russell King wrote: > > On Mon, Jun 21, 2004 at 03:35:42PM +0200, Takashi Iwai wrote: > > At Fri, 18 Jun 2004 20:43:22 +0100, > > Russell King wrote: > > > > > > On Fri, Jun 18, 2004 at 12:21:12PM -0700, Matt Porter wrote: > > > > > page_to_dma so that device specific dma addresses can be constructed. > > > > > > > > A struct device argument to page_to_dma seems like a no brainer to be > > > > included. > > > > > > Tony Lindgren recently submitted a patch for this: > > > > > > http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=1931/1 > > > > > > which now pending for Linus. ARM platforms now have three macros to > > > define if they want to override the default struct page to DMA address > > > translation. > > > > Wouldn't it be nicer to define a more generic style like > > > > struct page *dma_to_page(struct device *, void *, dma_addr_t) > > What's the 'void *' for? Hint: this has nothing to do with the virtual > address and DMA address returned from dma_alloc_coherent(). > > page_to_dma - converts a struct page to a DMA address for a given device > dma_to_virt - converts a DMA address to a CPU direct-mapped virtual address > virt_to_dma - converts a CPU direct-mapped virtual address to a DMA address Well, I thought the address handling can be dependent on the device type, thus passing the both virtual and BUS addresses _might_ help to calculate the DMA address in some cases. But forget it, seems exaggerated. Takashi - 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/