]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ARM: kexec: fix failure to boot crash kernel
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 19 Jul 2017 22:09:58 +0000 (23:09 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 20 Jul 2017 10:37:42 +0000 (11:37 +0100)
commit0d70262a2d60886da6fe5b1fc8bbcd76cbbc306d
treea5ba2a9cc7793d3cc4f14338ea37611356712f38
parent67556d7a851c20116923c23f1d49ecdec954e3a0
ARM: kexec: fix failure to boot crash kernel

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: 4cabd1d9625c ("ARM: 7539/1: kexec: scan for dtb magic in segments")
Fixes: 42d720d1731a ("ARM: kexec: Make .text R/W in machine_kexec")
Reported-by: Keerthy <j-keerthy@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/kexec.h
arch/arm/kernel/machine_kexec.c