Re: virt_to_phys() on 440

2 messages, 2 authors, 2003-09-08 · open the first message on its own page

Re: virt_to_phys() on 440

From: Matt Porter <mporter@kernel.crashing.org>
Date: 2003-09-08 22:14:59

On Mon, Sep 08, 2003 at 02:36:38PM -0700, 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.

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?
Read IO-mapping.txt and DMA-mapping.txt

PPC40x is incorrect.  These APIs are valid only for system
memory kernel addresses that are staticly mapped.

Anything wanting a generic translation from virt->phys should
call iopa() directly until somebody drives a generic translation
API into the kernel.

-Matt

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

Re: virt_to_phys() on 440

From: Brian Kuschak <hidden>
Date: 2003-09-08 22:36:49

These APIs are valid only for
system
memory kernel addresses that are staticly mapped.

Anything wanting a generic translation from
virt->phys should
call iopa() directly until somebody drives a generic
translation
API into the kernel.
Thanks, I missed that.

Regards,
Brian


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help