Skip to content

Commit 615af00

Browse files
Song Shuaictmarinas
authored andcommitted
arm64: hibernate: remove WARN_ON in save_processor_state
During hibernation or restoration, freeze_secondary_cpus checks num_online_cpus via BUG_ON, and the subsequent save_processor_state also does the checking with WARN_ON. In the case of CONFIG_PM_SLEEP_SMP=n, freeze_secondary_cpus is not defined, but the sole possible condition to disable CONFIG_PM_SLEEP_SMP is !SMP where num_online_cpus is always 1. We also don't have to check it in save_processor_state. So remove the unnecessary checking in save_processor_state. Signed-off-by: Song Shuai <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent af3215f commit 615af00

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

arch/arm64/kernel/hibernate.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ int pfn_is_nosave(unsigned long pfn)
9999

100100
void notrace save_processor_state(void)
101101
{
102-
WARN_ON(num_online_cpus() != 1);
103102
}
104103

105104
void notrace restore_processor_state(void)

0 commit comments

Comments
 (0)