Skip to content

Commit 166aaf3

Browse files
Dave MartinRussell King
authored andcommitted
ARM: 8029/1: mcpm: Rename the power_down_finish() functions to be less confusing
The name "power_down_finish" seems to be causing some confusion, because it suggests that this function is responsible for taking some action to cause the specified CPU to complete its power down. This patch renames the affected functions to "wait_for_powerdown" and similar, since this function's intended purpose is just to wait for the hardware to finish a powerdown initiated by a previous cpu_power_down. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 9581960 commit 166aaf3

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

arch/arm/common/mcpm_entry.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ void mcpm_cpu_power_down(void)
101101
BUG();
102102
}
103103

104-
int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster)
104+
int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster)
105105
{
106106
int ret;
107107

108-
if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down_finish))
108+
if (WARN_ON_ONCE(!platform_ops || !platform_ops->wait_for_powerdown))
109109
return -EUNATCH;
110110

111-
ret = platform_ops->power_down_finish(cpu, cluster);
111+
ret = platform_ops->wait_for_powerdown(cpu, cluster);
112112
if (ret)
113113
pr_warn("%s: cpu %u, cluster %u failed to power down (%d)\n",
114114
__func__, cpu, cluster, ret);

arch/arm/common/mcpm_platsmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static int mcpm_cpu_kill(unsigned int cpu)
6262

6363
cpu_to_pcpu(cpu, &pcpu, &pcluster);
6464

65-
return !mcpm_cpu_power_down_finish(pcpu, pcluster);
65+
return !mcpm_wait_for_cpu_powerdown(pcpu, pcluster);
6666
}
6767

6868
static int mcpm_cpu_disable(unsigned int cpu)

arch/arm/include/asm/mcpm.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster);
9191
* previously in which case the caller should take appropriate action.
9292
*
9393
* On success, the CPU is not guaranteed to be truly halted until
94-
* mcpm_cpu_power_down_finish() subsequently returns non-zero for the
94+
* mcpm_wait_for_cpu_powerdown() subsequently returns non-zero for the
9595
* specified cpu. Until then, other CPUs should make sure they do not
9696
* trash memory the target CPU might be executing/accessing.
9797
*/
9898
void mcpm_cpu_power_down(void);
9999

100100
/**
101-
* mcpm_cpu_power_down_finish - wait for a specified CPU to halt, and
101+
* mcpm_wait_for_cpu_powerdown - wait for a specified CPU to halt, and
102102
* make sure it is powered off
103103
*
104104
* @cpu: CPU number within given cluster
@@ -120,7 +120,7 @@ void mcpm_cpu_power_down(void);
120120
* - zero if the CPU is in a safely parked state
121121
* - nonzero otherwise (e.g., timeout)
122122
*/
123-
int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster);
123+
int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster);
124124

125125
/**
126126
* mcpm_cpu_suspend - bring the calling CPU in a suspended state
@@ -164,7 +164,7 @@ int mcpm_cpu_powered_up(void);
164164
struct mcpm_platform_ops {
165165
int (*power_up)(unsigned int cpu, unsigned int cluster);
166166
void (*power_down)(void);
167-
int (*power_down_finish)(unsigned int cpu, unsigned int cluster);
167+
int (*wait_for_powerdown)(unsigned int cpu, unsigned int cluster);
168168
void (*suspend)(u64);
169169
void (*powered_up)(void);
170170
};

arch/arm/mach-vexpress/tc2_pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static int tc2_core_in_reset(unsigned int cpu, unsigned int cluster)
209209
#define POLL_MSEC 10
210210
#define TIMEOUT_MSEC 1000
211211

212-
static int tc2_pm_power_down_finish(unsigned int cpu, unsigned int cluster)
212+
static int tc2_pm_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
213213
{
214214
unsigned tries;
215215

@@ -290,7 +290,7 @@ static void tc2_pm_powered_up(void)
290290
static const struct mcpm_platform_ops tc2_pm_power_ops = {
291291
.power_up = tc2_pm_power_up,
292292
.power_down = tc2_pm_power_down,
293-
.power_down_finish = tc2_pm_power_down_finish,
293+
.wait_for_powerdown = tc2_pm_wait_for_powerdown,
294294
.suspend = tc2_pm_suspend,
295295
.powered_up = tc2_pm_powered_up,
296296
};

0 commit comments

Comments
 (0)