提交 166aaf39 编写于 作者: D Dave Martin 提交者: Russell King

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: NDave Martin <Dave.Martin@arm.com>
Acked-by: NNicolas Pitre <nico@linaro.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 9581960a
...@@ -101,14 +101,14 @@ void mcpm_cpu_power_down(void) ...@@ -101,14 +101,14 @@ void mcpm_cpu_power_down(void)
BUG(); BUG();
} }
int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster) int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster)
{ {
int ret; int ret;
if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down_finish)) if (WARN_ON_ONCE(!platform_ops || !platform_ops->wait_for_powerdown))
return -EUNATCH; return -EUNATCH;
ret = platform_ops->power_down_finish(cpu, cluster); ret = platform_ops->wait_for_powerdown(cpu, cluster);
if (ret) if (ret)
pr_warn("%s: cpu %u, cluster %u failed to power down (%d)\n", pr_warn("%s: cpu %u, cluster %u failed to power down (%d)\n",
__func__, cpu, cluster, ret); __func__, cpu, cluster, ret);
......
...@@ -62,7 +62,7 @@ static int mcpm_cpu_kill(unsigned int cpu) ...@@ -62,7 +62,7 @@ static int mcpm_cpu_kill(unsigned int cpu)
cpu_to_pcpu(cpu, &pcpu, &pcluster); cpu_to_pcpu(cpu, &pcpu, &pcluster);
return !mcpm_cpu_power_down_finish(pcpu, pcluster); return !mcpm_wait_for_cpu_powerdown(pcpu, pcluster);
} }
static int mcpm_cpu_disable(unsigned int cpu) static int mcpm_cpu_disable(unsigned int cpu)
......
...@@ -91,14 +91,14 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster); ...@@ -91,14 +91,14 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster);
* previously in which case the caller should take appropriate action. * previously in which case the caller should take appropriate action.
* *
* On success, the CPU is not guaranteed to be truly halted until * On success, the CPU is not guaranteed to be truly halted until
* mcpm_cpu_power_down_finish() subsequently returns non-zero for the * mcpm_wait_for_cpu_powerdown() subsequently returns non-zero for the
* specified cpu. Until then, other CPUs should make sure they do not * specified cpu. Until then, other CPUs should make sure they do not
* trash memory the target CPU might be executing/accessing. * trash memory the target CPU might be executing/accessing.
*/ */
void mcpm_cpu_power_down(void); void mcpm_cpu_power_down(void);
/** /**
* mcpm_cpu_power_down_finish - wait for a specified CPU to halt, and * mcpm_wait_for_cpu_powerdown - wait for a specified CPU to halt, and
* make sure it is powered off * make sure it is powered off
* *
* @cpu: CPU number within given cluster * @cpu: CPU number within given cluster
...@@ -120,7 +120,7 @@ void mcpm_cpu_power_down(void); ...@@ -120,7 +120,7 @@ void mcpm_cpu_power_down(void);
* - zero if the CPU is in a safely parked state * - zero if the CPU is in a safely parked state
* - nonzero otherwise (e.g., timeout) * - nonzero otherwise (e.g., timeout)
*/ */
int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster); int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster);
/** /**
* mcpm_cpu_suspend - bring the calling CPU in a suspended state * mcpm_cpu_suspend - bring the calling CPU in a suspended state
...@@ -164,7 +164,7 @@ int mcpm_cpu_powered_up(void); ...@@ -164,7 +164,7 @@ int mcpm_cpu_powered_up(void);
struct mcpm_platform_ops { struct mcpm_platform_ops {
int (*power_up)(unsigned int cpu, unsigned int cluster); int (*power_up)(unsigned int cpu, unsigned int cluster);
void (*power_down)(void); void (*power_down)(void);
int (*power_down_finish)(unsigned int cpu, unsigned int cluster); int (*wait_for_powerdown)(unsigned int cpu, unsigned int cluster);
void (*suspend)(u64); void (*suspend)(u64);
void (*powered_up)(void); void (*powered_up)(void);
}; };
......
...@@ -209,7 +209,7 @@ static int tc2_core_in_reset(unsigned int cpu, unsigned int cluster) ...@@ -209,7 +209,7 @@ static int tc2_core_in_reset(unsigned int cpu, unsigned int cluster)
#define POLL_MSEC 10 #define POLL_MSEC 10
#define TIMEOUT_MSEC 1000 #define TIMEOUT_MSEC 1000
static int tc2_pm_power_down_finish(unsigned int cpu, unsigned int cluster) static int tc2_pm_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
{ {
unsigned tries; unsigned tries;
...@@ -290,7 +290,7 @@ static void tc2_pm_powered_up(void) ...@@ -290,7 +290,7 @@ static void tc2_pm_powered_up(void)
static const struct mcpm_platform_ops tc2_pm_power_ops = { static const struct mcpm_platform_ops tc2_pm_power_ops = {
.power_up = tc2_pm_power_up, .power_up = tc2_pm_power_up,
.power_down = tc2_pm_power_down, .power_down = tc2_pm_power_down,
.power_down_finish = tc2_pm_power_down_finish, .wait_for_powerdown = tc2_pm_wait_for_powerdown,
.suspend = tc2_pm_suspend, .suspend = tc2_pm_suspend,
.powered_up = tc2_pm_powered_up, .powered_up = tc2_pm_powered_up,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册