Kumar Gala wrote:

Right, so when do you know if you'll be using MURAM or normal memory? Why not just keep around a token that is the physical address at the point you make the decision of MURAM vs normal memory.

That's what the original code did, kinda. It called virt_to_phys() if it is main memory, and it called immrbar_virt_to_phys() if it is MURAM. immrbar_virt_to_phys() did pointer math to extract the physical address.

I knew that Leo's patch was calling iopa() on main memory, but since it worked, I didn't think much about it. But it does make some sense that since we obtain the physical address when we allocate the BD ring, we should store that address and use it.

That's what most drivers do, anyway, and so we should do the same thing. So instead of p_tx_bd_ring[i], we would have p_tx_bd_ring[i].virtual and p_tx_bd_ring[i].physical.

Besides, iopa() is slower, because it walks page tables.


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to