Skip to content

Commit

Permalink
ARM: pm: move cpu_init() call into core code
Browse files Browse the repository at this point in the history
As we have core code dealing with CPU suspend/resume, we can
re-initialize the CPUs exception banked registers via that code rather
than having platforms deal with that level of detail.  So, move the
call to cpu_init() out of platform code into core code.

Tested-by: Kevin Hilman <khilman@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jun 24, 2011
1 parent e8856a8 commit 14cd8fd
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions arch/arm/kernel/sleep.S
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ ENDPROC(cpu_resume_turn_mmu_on)
cpu_resume_after_mmu:
str r5, [r2, r4, lsl #2] @ restore old mapping
mcr p15, 0, r0, c1, c0, 0 @ turn on D-cache
bl cpu_init @ restore the und/abt/irq banked regs
ldmfd sp!, {r4 - r11, pc}
ENDPROC(cpu_resume_after_mmu)

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-pxa/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ int pxa_pm_enter(suspend_state_t state)

/* *** go zzz *** */
pxa_cpu_pm_fns->enter(state);
cpu_init();

if (state != PM_SUSPEND_STANDBY && pxa_cpu_pm_fns->restore) {
/* after sleeping, validate the checksum */
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-sa1100/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ static int sa11x0_pm_enter(suspend_state_t state)
/* go zzz */
sa1100_cpu_suspend(PLAT_PHYS_OFFSET - PAGE_OFFSET);

cpu_init();

/*
* Ensure not to come back here if it wasn't intended
*/
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/plat-samsung/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ static int s3c_pm_enter(suspend_state_t state)

s3c_cpu_save(0, PLAT_PHYS_OFFSET - PAGE_OFFSET);

/* restore the cpu state using the kernel's cpu init code. */

cpu_init();

/* restore the system state */

s3c_pm_restore_core();
Expand Down

0 comments on commit 14cd8fd

Please sign in to comment.