Commit Graph

6 Commits

Author SHA1 Message Date
Eric Cooper
868d172b8a [ARM] add machine-specific hook to machine_kexec
Provide the option to call a machine-specific function
before kexec'ing a new kernel.

Signed-off-by: Eric Cooper <ecc@cmu.edu>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2011-03-03 16:26:55 -05:00
Dave Martin
cd849ae9cd ARM: 6518/1: kexec: Fix crash_setup_regs() for ARMv7 and CONFIG_THUMB2_KERNEL
* 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>
2010-12-04 11:00:53 +00:00
Dave Martin
0946b8c5c5 ARM: 6517/1: kexec: Add missing memory clobber to inline asm in crash_setup_regs()
Currently, the inline asm is passed &newregs->ARM_r0 as in input,
when modifying multiple fields of newregs.

It's plausible to assume that GCC will assume newregs->ARM_r0 is
modified when passed the address, but unfortunately this assumption
is incorrect.

Also, GCC has no way to guess that the other ARM_r* fields are
modified without the addition of a "memory" clobber.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-04 11:00:52 +00:00
Mika Westerberg
24b776bfb6 ARM: 6117/1: kdump: implement crash_setup_regs()
Implement machine specific function crash_setup_regs() which is
responsible for storing machine state when crash occured.

Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-09 15:00:51 +01:00
Huang Ying
163f6876f5 kexec jump: rename KEXEC_CONTROL_CODE_SIZE to KEXEC_CONTROL_PAGE_SIZE
Rename KEXEC_CONTROL_CODE_SIZE to KEXEC_CONTROL_PAGE_SIZE, because control
page is used for not only code on some platform.  For example in kexec
jump, it is used for data and stack too.

[akpm@linux-foundation.org: unbreak powerpc and arm, finish conversion]
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15 08:35:42 -07:00
Russell King
4baa992243 [ARM] move include/asm-arm to arch/arm/include/asm
Move platform independent header files to arch/arm/include/asm, leaving
those in asm/arch* and asm/plat* alone.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-02 21:32:35 +01:00