aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-19 13:39:33 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-19 13:39:33 -0400
commit36c5ed23b9f535d1c79986efb45f9c1f115e0997 (patch)
tree5a493a7b19b02a8c7ccadafc5a3f55ca9da6605e
parent3aa3dfb372576f30835a94409556e3c8681b5756 (diff)
[PATCH] ARM SMP: Fix PXA/SA11x0 suspend resume crash
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>
-rw-r--r--arch/arm/kernel/setup.c2
-rw-r--r--arch/arm/mach-pxa/pm.c2
-rw-r--r--arch/arm/mach-sa1100/pm.c2
-rw-r--r--include/asm-arm/system.h1
4 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 7ecdda3f1253..9fed5fa194d9 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -328,7 +328,7 @@ static void __init setup_processor(void)
328 * cpu_init dumps the cache information, initialises SMP specific 328 * cpu_init dumps the cache information, initialises SMP specific
329 * information, and sets up the per-CPU stacks. 329 * information, and sets up the per-CPU stacks.
330 */ 330 */
331void __init cpu_init(void) 331void cpu_init(void)
332{ 332{
333 unsigned int cpu = smp_processor_id(); 333 unsigned int cpu = smp_processor_id();
334 struct stack *stk = &stacks[cpu]; 334 struct stack *stk = &stacks[cpu];
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 9799fe80df23..ac4dd4336160 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -133,6 +133,8 @@ static int pxa_pm_enter(suspend_state_t state)
133 /* *** go zzz *** */ 133 /* *** go zzz *** */
134 pxa_cpu_pm_enter(state); 134 pxa_cpu_pm_enter(state);
135 135
136 cpu_init();
137
136 /* after sleeping, validate the checksum */ 138 /* after sleeping, validate the checksum */
137 checksum = 0; 139 checksum = 0;
138 for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++) 140 for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++)
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
index 379ea5e3950f..59c7964cfe11 100644
--- a/arch/arm/mach-sa1100/pm.c
+++ b/arch/arm/mach-sa1100/pm.c
@@ -88,6 +88,8 @@ static int sa11x0_pm_enter(suspend_state_t state)
88 /* go zzz */ 88 /* go zzz */
89 sa1100_cpu_suspend(); 89 sa1100_cpu_suspend();
90 90
91 cpu_init();
92
91 /* 93 /*
92 * Ensure not to come back here if it wasn't intended 94 * Ensure not to come back here if it wasn't intended
93 */ 95 */
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index b13a8da4847b..8405eb6558ed 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -104,6 +104,7 @@ extern void show_pte(struct mm_struct *mm, unsigned long addr);
104extern void __show_regs(struct pt_regs *); 104extern void __show_regs(struct pt_regs *);
105 105
106extern int cpu_architecture(void); 106extern int cpu_architecture(void);
107extern void cpu_init(void);
107 108
108#define set_cr(x) \ 109#define set_cr(x) \
109 __asm__ __volatile__( \ 110 __asm__ __volatile__( \