lkml.org 
[lkml]   [1998]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Accessing MMIO PCI space - crossplatform
On Fri, Nov 13, 1998 at 01:41:31PM +0100, Rogier Wolff wrote:
> Jamie Lokier wrote:
> > Remove phys_to_virt: it does not make sense.
>
> Some PCI controllers are able to create linked lists in memory. You
> give them some memory to work with, and they manage the memory in that
> area. If you walk that list and have found a pointer to a data-area,
> you will need to dereference that physical address.

Yes, but you always dereference it as a *kernel virtual* address.
I.e., "virt" not "phys".

If the pointer was created by the controller, then it's a "bus" address.
If the pointer was created by the kernel (e.g. address of a preallocated
data area), then it's a "virt" address.

So you either need bus_to_virt(ptr) or just ptr.

"phys" type addresses are only used for page tables. And even when
hand-translating a page table, pte_page(x) returns a "virt" address.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.035 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site