[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45CB270C.5090603@freescale.com>
Date: Thu, 08 Feb 2007 07:35:08 -0600
From: Timur Tabi <timur@...escale.com>
To: Kumar Gala <galak@...nel.crashing.org>
CC: Li Yang-r58472 <LeoLi@...escale.com>, netdev@...r.kernel.org,
linuxppc-dev@...abs.org
Subject: Re: [PATCH 1/4] ucc_geth: Change private immrbar_virt_to_phys to
generic iopa
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists