lkml.org 
[lkml]   [1999]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Specifying properly the PCI driver model on all linux architectur es, (ioremap(), bus_to_virt() ...)
From
Date
>>>>> "Adrian" == Adrian Cox <apc@agelectronics.co.uk> writes:

Adrian> But with multiple PCI buses, the base_address cannot be a
Adrian> simple bus address, because the PCI bus number must be coded
Adrian> in there. For example, on alpha the PCI_HANDLE from
Adrian> include/asm-alpha/pci.h is or'ed into the base_address.

Adrian> As far as I can tell, the base_address[] is always correct for
Adrian> ioremap. But are the following two tricks valid:

Thats my assumption and at least thats what I have been telling people
so far ;-)

Adrian> 1) Using the contents of base_address[] as an offset when
Adrian> mmapping /dev/mem from userspace?

I would probably go for using virt_to_bus(ioremap(base_address[]))
here.

Adrian> 2) Using the contents of base_address[] as a target address
Adrian> for peer to peer DMA on PCI?

Hmmm, interesting, I would say same answer as for 1).

By using this approach it should be safe for the boot sequence code to
mangle base_address[] when you have multiple PCI busses and it will
still be possible for ioremap() to do the right thing.

Jes

-
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:54    [W:0.126 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site