ARM: 6518/1: kexec: Fix crash_setup_regs() for ARMv7 and CONFIG_THUMB2_KERNEL
authorDave Martin <dave.martin@linaro.org>
Wed, 1 Dec 2010 17:05:14 +0000 (18:05 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 4 Dec 2010 11:00:53 +0000 (11:00 +0000)
  * Fix kexec build failure with CONFIG_THUMB2_KERNEL.

  * Avoids deprecated/forbidden sp and pc usage in for ARMv7
    onwards, retaining compatibility with older architecture
    versions.

  * The pc value saved to newregs is now aligned on a predictable
    instruction boundary.

    (stmia { ... pc } or str pc has implementation-defined results
    in most versions of the ARM architecutre, and is prohibited
    (unpredictable) in Thumb-2.)

  * Switch to named inline asm arguments (else I get readily
    confused ...)

    The resulting code should be compatible with all architecture
    versions >= v3, with or without CONFIG_THUMB2_KERNEL.

Reviewed-by: Will Deacon <will.deacon@arm.com>
Tested-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

No differences found