• R
    ARM: kexec: fix failure to boot crash kernel · 0d70262a
    Russell King 提交于
    When kexec was converted to DTB, the dtb address was passed between
    machine_kexec_prepare() and machine_kexec() using a static variable.
    This is bad news if you load a crash kernel followed by a normal
    kernel or vice versa - the last loaded kernel overwrites the dtb
    address.
    
    This can result in kexec failures, as (eg) we try to boot the crash
    kernel with the last loaded dtb.  For example, with:
    
    the crash kernel fails to find the dtb.
    
    Avoid this by defining a kimage architecture structure, and store
    the address to be passed in r2 there, which will either be the ATAGs
    or the dtb blob.
    
    Fixes: 4cabd1d9 ("ARM: 7539/1: kexec: scan for dtb magic in segments")
    Fixes: 42d720d1 ("ARM: kexec: Make .text R/W in machine_kexec")
    Reported-by: NKeerthy <j-keerthy@ti.com>
    Tested-by: NKeerthy <j-keerthy@ti.com>
    Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
    0d70262a
kexec.h 2.3 KB