[PATCH] ARM SMP: Fix PXA/SA11x0 suspend resume crash
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sun, 19 Jun 2005 17:39:33 +0000 (18:39 +0100)
committerRussell King <rmk@dyn-67.arm.linux.org.uk>
Sun, 19 Jun 2005 17:39:33 +0000 (18:39 +0100)
We need to re-initialise the stack pointers for undefined, IRQ
and abort mode handlers whenever we resume.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/setup.c
arch/arm/mach-pxa/pm.c
arch/arm/mach-sa1100/pm.c
include/asm-arm/system.h

index 7ecdda3f125338112ca30d52dc09d494ae52e864..9fed5fa194d9022830e4ecc83b206f03a15a832d 100644 (file)
@@ -328,7 +328,7 @@ static void __init setup_processor(void)
  * cpu_init dumps the cache information, initialises SMP specific
  * information, and sets up the per-CPU stacks.
  */
-void __init cpu_init(void)
+void cpu_init(void)
 {
        unsigned int cpu = smp_processor_id();
        struct stack *stk = &stacks[cpu];
index 9799fe80df23255d6d77bca271100b7b683a9345..ac4dd4336160bc2d202f7059e639d83836f52bda 100644 (file)
@@ -133,6 +133,8 @@ static int pxa_pm_enter(suspend_state_t state)
        /* *** go zzz *** */
        pxa_cpu_pm_enter(state);
 
+       cpu_init();
+
        /* after sleeping, validate the checksum */
        checksum = 0;
        for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++)
index 379ea5e3950f7de6794ef990a91ef89f58352e3c..59c7964cfe11d0a9b68193f5efb369c592ab1a7e 100644 (file)
@@ -88,6 +88,8 @@ static int sa11x0_pm_enter(suspend_state_t state)
        /* go zzz */
        sa1100_cpu_suspend();
 
+       cpu_init();
+
        /*
         * Ensure not to come back here if it wasn't intended
         */
index b13a8da4847b0240be605a000fb83e9ad9b0b882..8405eb6558edf141999df5ace0c3ba4bf7070ce4 100644 (file)
@@ -104,6 +104,7 @@ extern void show_pte(struct mm_struct *mm, unsigned long addr);
 extern void __show_regs(struct pt_regs *);
 
 extern int cpu_architecture(void);
+extern void cpu_init(void);
 
 #define set_cr(x)                                      \
        __asm__ __volatile__(                           \