Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt
From: Christoph Hellwig
Date: Tue May 16 2006 - 16:04:40 EST
On Mon, May 15, 2006 at 02:21:21PM -0700, Bryan O'Sullivan wrote:
> On Mon, 2006-05-15 at 08:50 -0700, Roland Dreier wrote:
> > Actually I NAK'ed this patch. It compiles the same thing on x86_64
> > but makes the source code wrong -- dma_map_single() returns a bus
> > address, not a physical address.
> As Segher mentioned, bus_to_virt is unportable, so it's definitely the
> wrong thing to use.
phys_to_virt is as bad. please fix your code to do the right thing, that
is to stop pretending to be able to map back from a bus to a virtual address.
The only way to get at the virtual address from a bus one is to store it
away at the time you call the dma mapping function.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/