Skip to content

Commit

Permalink
[PATCH] ARM SMP: Fix PXA/SA11x0 suspend resume crash
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Jun 19, 2005
1 parent 3aa3dfb commit 36c5ed2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-pxa/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-sa1100/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
1 change: 1 addition & 0 deletions include/asm-arm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__( \
Expand Down

0 comments on commit 36c5ed2

Please sign in to comment.