lkml.org 
[lkml]   [2006]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-16 22:07    [W:0.074 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site