[U-Boot] [PATCH v4 1/4] Introduce virt_to_phys()

Kumar Gala galak at kernel.crashing.org
Wed Dec 17 17:04:13 CET 2008


On Dec 17, 2008, at 10:00 AM, Haavard Skinnemoen wrote:

> Kumar Gala wrote:
>>> /* virt_to_phys will only work when address is in P1 or P2 */
>>> -static __inline__ unsigned long virt_to_phys(volatile void  
>>> *address)
>>> +static inline phys_addr_t virt_to_phys(volatile void *address)
>>> {
>>
>> Is the volatile really needed?
>
> The problem is that the 'packet' parameter to struct eth_device.send()
> is volatile, and it propagates into this function. So if I remove the
> volatile, I have to either add ugly casts elsewhere or change the
> eth_device API...
>
> I have no idea why the network subsystem feels the need to enforce the
> use of volatile in all drivers, though...

Lets go w/volatile for now and worry about this post v2009.01

- k


More information about the U-Boot mailing list