Re: phys-to-virt kernel mapping and ioremap()

Ivan Passos
2000-07-20T19:12:39Z

On Thu, 20 Jul 2000, Timur Tabi wrote:
>
> > Timur> 1) Doesn't this mapping break the phys_to_virt and virt_to_phys
> > Timur> macros?
> >
> > Those two macros are not defined on ioremap'ed regions so it is
> > irrelevant.
>
> In that case, how do I do virt-to-phys and phys-to-virt translations on the
> memory addresses for ioremap'ed regions?

Why would you wanna do that for a PCI MMIO region??

1) ioremap(PCI_addr) returns a virtual address.
2) Use read[bwl], write[bwl], memcpy_toio, memcpy_fromio, memset_io ...
with the obtained virtual address to access the MMIO region.

What else do you need?? Please let us know.

Regards,
Ivan