virt_to_phys() on 440

Eugene Surovegin ebs at ebshome.net
Tue Sep 9 08:08:12 EST 2003


At 02:36 PM 9/8/2003, Brian Kuschak wrote:

>I think the virt_to_phys() function is incorrect for
>PPC440.  It should call iopa for all 4xx, not only the
>405.  By chance, it happens to work currently if the
>address is in SDRAM, but is always incorrect for
>ioremapped addresses.  virt_to_bus() does the right
>thing.

No, it shouldn't call iopa even for 405. Look at 2.6 version for example.

virt_to_phys is used only for directly mapped addresses not for ioremaped
peripherals or vmalloc space.

>Also, to be correct, shouldn't this function return a
>phys_addr_t rather than an unsigned long, as the
>physical address is >32 bits on 44x?

440 cannot handle more than 2G of RAM, so physaddr_t is not needed.

Eugene.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list