Re: [PATCH 01/12] arm64: hibernate.c: create a new function to handle cpu_up(sleep_cpu)

From: Thomas Gleixner
Date: Tue Nov 19 2019 - 17:31:51 EST


On Wed, 30 Oct 2019, Qais Yousef wrote:
>
> +int hibernation_bringup_sleep_cpu(unsigned int sleep_cpu)

That function name is horrible. Aside of that I really have to ask how you
end up hibernating on an offline CPU?

> +{
> + int ret;
> +
> + if (!cpu_online(sleep_cpu)) {
> + pr_info("Hibernated on a CPU that is offline! Bringing CPU up.\n");
> + ret = cpu_up(sleep_cpu);
> + if (ret) {
> + pr_err("Failed to bring hibernate-CPU up!\n");
> + return ret;
> + }
> + }
> +}

Thanks,

tglx