summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/platsmp-apmu.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-05-30 17:15:26 +0200
committerSimon Horman <horms+renesas@verge.net.au>2018-06-18 12:00:22 +0200
commitfa6e9cb2aca1cdca1b85e5b19f9cda8aac78752b (patch)
treeaed3d4c7d6c512c042ba4076dcc5b8076a438fef /arch/arm/mach-shmobile/platsmp-apmu.c
parentaa03319f28402fa7613d313b411490952b3f9bd4 (diff)
downloadlinux-fa6e9cb2aca1cdca1b85e5b19f9cda8aac78752b.tar.bz2
ARM: shmobile: apmu: Move cpu_leave_lowpower() to SUSPEND section
cpu_leave_lowpower() is used for suspend only, not for CPU hotplug. Hence move it from the HOTPLUG_CPU || SUSPEND section to the SUSPEND section. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/platsmp-apmu.c')
-rw-r--r--arch/arm/mach-shmobile/platsmp-apmu.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index ba732effc90b..778b6b618ce7 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -270,21 +270,6 @@ static void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu)
/* Do ARM specific CPU shutdown */
cpu_enter_lowpower_a15();
}
-
-static inline void cpu_leave_lowpower(void)
-{
- unsigned int v;
-
- asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
- " orr %0, %0, %1\n"
- " mcr p15, 0, %0, c1, c0, 0\n"
- " mrc p15, 0, %0, c1, c0, 1\n"
- " orr %0, %0, %2\n"
- " mcr p15, 0, %0, c1, c0, 1\n"
- : "=&r" (v)
- : "Ir" (CR_C), "Ir" (0x40)
- : "cc");
-}
#endif
#if defined(CONFIG_HOTPLUG_CPU)
@@ -315,6 +300,21 @@ static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
return 1;
}
+static inline void cpu_leave_lowpower(void)
+{
+ unsigned int v;
+
+ asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
+ " orr %0, %0, %1\n"
+ " mcr p15, 0, %0, c1, c0, 0\n"
+ " mrc p15, 0, %0, c1, c0, 1\n"
+ " orr %0, %0, %2\n"
+ " mcr p15, 0, %0, c1, c0, 1\n"
+ : "=&r" (v)
+ : "Ir" (CR_C), "Ir" (0x40)
+ : "cc");
+}
+
static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
{
cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);