Skip to content

Commit

Permalink
arm64: hibernate: Use bringup_hibernate_cpu()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Qais Yousef authored and Thomas Gleixner committed Mar 25, 2020
1 parent d720f98 commit e646ac5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions arch/arm64/kernel/hibernate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e646ac5

Please sign in to comment.