Re: Question about ioremap and io_remap_page_range

Armin Schindler (mac@melware.de)
Thu, 27 Sep 2001 10:03:26 +0200 (MEST)


On Thu, 27 Sep 2001, Ingo Molnar wrote:

>
> On Thu, 27 Sep 2001, [GB2312] Êæ¹úÇ¿ wrote:
>
> > Here is some rather basic questions I want ask ,any reply or comment
> > please CC to my emailbox,thank you very much.
> >
> > When I work with kernel 2.4.2 in Intel X86 , I use
> >
> > VIRT_ADDR = ioremap(BUS_ADDR); to map a section of PCI memory, and
> > X_ADDR = virt_to_phys(VIRT_ADDR);
>
> i'd suggest to read Documentation/DMA-mapping.txt in any recent kernel
> source, the bus_to_virt()/virt_to_phys() interface is obsolete and has
> been replaced by the pci_alloc_*/pci_map_*/pci_free_*() dynamic
> DMA-mapping API. You can find some nice examples of usage in
> drivers/net/*.c.
>
> Ingo

virt_to_phys() is obsolete ? What should be used if I need the phys address
of a memory page ? (e.g. for mmap() remapping)

Armin

-
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/