arm64: hibernate: Use bringup_hibernate_cpu()
authorQais Yousef <qais.yousef@arm.com>
Mon, 23 Mar 2020 13:51:01 +0000 (13:51 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 25 Mar 2020 11:59:34 +0000 (12:59 +0100)
Use bringup_hibernate_cpu() instead of open coding it.

[ tglx: Split out the core change ]

Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200323135110.30522-9-qais.yousef@arm.com
arch/arm64/kernel/hibernate.c

index 590963c..5b73e92 100644 (file)
@@ -166,14 +166,11 @@ int arch_hibernation_header_restore(void *addr)
                sleep_cpu = -EINVAL;
                return -EINVAL;
        }
-       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");
-                       sleep_cpu = -EINVAL;
-                       return ret;
-               }
+
+       ret = bringup_hibernate_cpu(sleep_cpu);
+       if (ret) {
+               sleep_cpu = -EINVAL;
+               return ret;
        }
 
        resume_hdr = *hdr;