Skip to contentSkip to conversation

modules/dma/physical address

DISCUSSION Marcus Sundberg 1 participant 1 message Mar 13, 2000 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 11 lines · duyrat1 <[email protected]> writes:

Hy everybody,

I think I have found a little source of bug, so please correct me if I am wrong :

Every time we use a dma on the mpc860, we've got to give him the physical address
of a buffer ( the physical addr of a sk_buff in enet.c for exemple ). We use __pa which purpose is just to substract 0xc0000000. But when we create a buffer in a module, his virtual addr is not just an offset of his physical addr,

Yes it is, if you use __pa on addresses it is intended to be used on. (Well, to be precise __pa should never be used in drivers at all, you should use virt_to_phys instead, but in the end they do the same thing on PPC)

//Marcus
--
Signature under construction, please come back later.

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