Commit e646ac5b authored by Qais Yousef's avatar Qais Yousef Committed by Thomas Gleixner

arm64: hibernate: Use bringup_hibernate_cpu()

Use bringup_hibernate_cpu() instead of open coding it.

[ tglx: Split out the core change ]
Signed-off-by: default avatarQais Yousef <qais.yousef@arm.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200323135110.30522-9-qais.yousef@arm.com
parent d720f986
...@@ -166,15 +166,12 @@ int arch_hibernation_header_restore(void *addr) ...@@ -166,15 +166,12 @@ int arch_hibernation_header_restore(void *addr)
sleep_cpu = -EINVAL; sleep_cpu = -EINVAL;
return -EINVAL; return -EINVAL;
} }
if (!cpu_online(sleep_cpu)) {
pr_info("Hibernated on a CPU that is offline! Bringing CPU up.\n"); ret = bringup_hibernate_cpu(sleep_cpu);
ret = cpu_up(sleep_cpu);
if (ret) { if (ret) {
pr_err("Failed to bring hibernate-CPU up!\n");
sleep_cpu = -EINVAL; sleep_cpu = -EINVAL;
return ret; return ret;
} }
}
resume_hdr = *hdr; resume_hdr = *hdr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment