On 10/30/2012 01:09 AM, Jayachandran C. wrote: [...]
We had seen the same issue here, and worked around it the same way (i.e use dynamic allocation for the backing dev structures). I ran across a similar issue in using built-in DTB (basically, kernel data address does not work for virt_to_phys/phys_to_virt in 64-bit when the load address is in CKSEG0). There I did something like this: ptr = phys_to_virt(__pa(kernel_data_ptr)); This works since __pa knows about CKSEG0 addresses in 64bit.
Really the proper fix is to make virt_to_phys() work. This isn't the only case where we have seen failures due to this issue:
http://www.linux-mips.org/archives/linux-mips/2011-09/msg00029.html I fixed it like this... In io.h: static inline unsigned long virt_to_phys(volatile const void *address) { return __pa(address); } Really this needs to be pushed upstream by somebody.
JC.