Re: Physical memory addresses/PCI memory addresses/io_remap

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Thu Dec 14 2000 - 13:37:22 EST


> > 1. Should pci_resource_start be returning the PCI memory space address or
> > a physical memory space address?
>
> I believe that pci_resource_start() should return physical address, not
> bus one. It already happens on PReP.

It returns a cookie for use with ioremap. Who says that a given device has
a constant bus or physical mapping that is unique ?

> > 4. What does this mean for ioremap? (currently, on ARM, ioremap takes
> > PCI memory space addresses, not a physical memory address, which makes
> > the physmap MTD driver technically broken).
>
> And ioremap() should take physical address, returning virtual one.

No. Ioremap takes a cookie and returns a different cookie suitable for using
with readb/writeb/memcpy_fromio and friends.

Eg on Sparc64 its a physical address and readb uses TLB bypass

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



This archive was generated by hypermail 2b29 : Fri Dec 15 2000 - 21:00:30 EST