1 From af391b15f7b56ce19f52862d36595637dd42b575 Mon Sep 17 00:00:00 2001
2 From: Sudeep Holla <sudeep.holla@arm.com>
3 Date: Thu, 18 Jun 2015 15:41:32 +0100
4 Subject: arm64: kernel: rename __cpu_suspend to keep it aligned with arm
6 From: Sudeep Holla <sudeep.holla@arm.com>
8 commit af391b15f7b56ce19f52862d36595637dd42b575 upstream.
10 This patch renames __cpu_suspend to cpu_suspend so that it's aligned
11 with ARM32. It also removes the redundant wrapper created.
13 This is in preparation to implement generic PSCI system suspend using
14 the cpu_{suspend,resume} which now has the same interface on both ARM
17 Cc: Mark Rutland <mark.rutland@arm.com>
18 Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
19 Reviewed-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
20 Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
21 Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 arch/arm64/include/asm/cpuidle.h | 8 ++------
26 arch/arm64/include/asm/suspend.h | 2 +-
27 arch/arm64/kernel/cpuidle.c | 4 ++--
28 arch/arm64/kernel/psci.c | 2 +-
29 arch/arm64/kernel/suspend.c | 6 +++---
30 5 files changed, 9 insertions(+), 13 deletions(-)
32 --- a/arch/arm64/include/asm/cpuidle.h
33 +++ b/arch/arm64/include/asm/cpuidle.h
36 #ifdef CONFIG_CPU_IDLE
37 extern int arm_cpuidle_init(unsigned int cpu);
38 -extern int cpu_suspend(unsigned long arg);
39 +extern int arm_cpuidle_suspend(int index);
41 static inline int arm_cpuidle_init(unsigned int cpu)
46 -static inline int cpu_suspend(unsigned long arg)
47 +static inline int arm_cpuidle_suspend(int index)
52 -static inline int arm_cpuidle_suspend(int index)
54 - return cpu_suspend(index);
57 --- a/arch/arm64/include/asm/suspend.h
58 +++ b/arch/arm64/include/asm/suspend.h
59 @@ -21,6 +21,6 @@ struct sleep_save_sp {
60 phys_addr_t save_ptr_stash_phys;
63 -extern int __cpu_suspend(unsigned long arg, int (*fn)(unsigned long));
64 +extern int cpu_suspend(unsigned long arg, int (*fn)(unsigned long));
65 extern void cpu_resume(void);
67 --- a/arch/arm64/kernel/cpuidle.c
68 +++ b/arch/arm64/kernel/cpuidle.c
69 @@ -37,7 +37,7 @@ int arm_cpuidle_init(unsigned int cpu)
70 * Return: 0 on success, -EOPNOTSUPP if CPU suspend hook not initialized, CPU
71 * operations back-end error code otherwise.
73 -int cpu_suspend(unsigned long arg)
74 +int arm_cpuidle_suspend(int index)
76 int cpu = smp_processor_id();
78 @@ -47,5 +47,5 @@ int cpu_suspend(unsigned long arg)
80 if (!cpu_ops[cpu] || !cpu_ops[cpu]->cpu_suspend)
82 - return cpu_ops[cpu]->cpu_suspend(arg);
83 + return cpu_ops[cpu]->cpu_suspend(index);
85 --- a/arch/arm64/kernel/psci.c
86 +++ b/arch/arm64/kernel/psci.c
87 @@ -546,7 +546,7 @@ static int __maybe_unused cpu_psci_cpu_s
88 if (state[index - 1].type == PSCI_POWER_STATE_TYPE_STANDBY)
89 ret = psci_ops.cpu_suspend(state[index - 1], 0);
91 - ret = __cpu_suspend(index, psci_suspend_finisher);
92 + ret = cpu_suspend(index, psci_suspend_finisher);
96 --- a/arch/arm64/kernel/suspend.c
97 +++ b/arch/arm64/kernel/suspend.c
98 @@ -51,13 +51,13 @@ void __init cpu_suspend_set_dbg_restorer
105 * arg: argument to pass to the finisher function
106 * fn: finisher function pointer
109 -int __cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
110 +int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
112 struct mm_struct *mm = current->active_mm;
114 @@ -82,7 +82,7 @@ int __cpu_suspend(unsigned long arg, int
115 * We are resuming from reset with TTBR0_EL1 set to the
116 * idmap to enable the MMU; restore the active_mm mappings in
117 * TTBR0_EL1 unless the active_mm == &init_mm, in which case
118 - * the thread entered __cpu_suspend with TTBR0_EL1 set to
119 + * the thread entered cpu_suspend with TTBR0_EL1 set to
120 * reserved TTBR0 page tables and should be restored as such.