This patch prevents the attempt to turn off CPU0
because TM2 uses the Exynos5433 SoC which doesn't
permit to turn off the CPU0 due to the h/w design
issue.
Change-Id: I6795aad5ff80c1728db42bc808bac8806d5daa76
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
char path[PATH_MAX];
int ret;
-
if ((!res_name))
return -EINVAL;
if ((cpu < TM2_CPU_MIN_NUM) || (cpu > TM2_CPU_MAX_NUM))
if ((on != CPU_ONLINE_STATE_ON) && (on != CPU_ONLINE_STATE_OFF))
return -EINVAL;
- /* TODO: Can we turn off CPU0? */
+ /*
+ * NOTE: Exynos SoC series cannot turn off the CPU0
+ * because of h/w design. To prevent the critical problem,
+ * if someone try to turn off the CPU0, just return without any
+ * opertaion.
+ */
+ if (on == 0 && cpu == 0) {
+ _E("cannot turn off the CPU0");
+ return 0;
+ }
snprintf(path, PATH_MAX, "%s%d%s",
CPU_ONLINE_PATH_PREFIX,