[Crash-utility] ARM support for CONFIG_SPARSEMEM:(was Re:DDimage)

Mika Westerberg mika.westerberg at iki.fi
Thu May 26 17:56:51 UTC 2011


On Fri, May 27, 2011 at 12:37:31AM +0900, takuo.koguchi.sw at hitachi.com wrote:
> 40 
> 41 #if (defined(CONFIG_SPARSEMEM) && defined(CONFIG_VMSPLIT_3G))
> 42 
> 43 #define __phys_to_virt(phys)                            \
> 44         ((phys) >= EBI1_PHYS_OFFSET ?                   \
> 45         (phys) - EBI1_PHYS_OFFSET + EBI1_PAGE_OFFSET :  \
> 46         (phys) - EBI0_PHYS_OFFSET + EBI0_PAGE_OFFSET)
> 47 
> 48 #define __virt_to_phys(virt)                            \
> 49         ((virt) >= EBI1_PAGE_OFFSET ?                   \
> 50         (virt) - EBI1_PAGE_OFFSET + EBI1_PHYS_OFFSET :  \
> 51         (virt) - EBI0_PAGE_OFFSET + EBI0_PHYS_OFFSET)
> 52 
> 53 #endif

Aha, now I think I know what is wrong here -- your platform is one of those
where normal v<->p translation does not apply!

> And I guess VTOP/PTOV needs modification in accordance with __phys_to_virt
> and __virt_to_phys.

Yup, I think that in this case modifying VTOP/PTOV should solve the problem.

To solve this in generic way, is a bit harder. Maybe it is time to add some
platform specific code to crash which can override these kinds of things?




More information about the Crash-utility mailing list