ARM: 7848/1: mcpm: Implement cpu_kill() to synchronise on powerdown
[sfrench/cifs-2.6.git] / arch / arm / common / mcpm_entry.c
index 990250965f2cfb4e4e3a984678fcf62eedbcdb8d..6c03d0152e7f8ceefc76f9d0d0b09722128f45f9 100644 (file)
@@ -90,6 +90,21 @@ void mcpm_cpu_power_down(void)
        BUG();
 }
 
+int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster)
+{
+       int ret;
+
+       if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down_finish))
+               return -EUNATCH;
+
+       ret = platform_ops->power_down_finish(cpu, cluster);
+       if (ret)
+               pr_warn("%s: cpu %u, cluster %u failed to power down (%d)\n",
+                       __func__, cpu, cluster, ret);
+
+       return ret;
+}
+
 void mcpm_cpu_suspend(u64 expected_residency)
 {
        phys_reset_t phys_reset;