1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Common powerpc suspend code for 32 and 64 bits
5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
8 #include <linux/sched.h>
9 #include <linux/suspend.h>
10 #include <asm/current.h>
11 #include <asm/mmu_context.h>
12 #include <asm/switch_to.h>
14 void save_processor_state(void)
17 * flush out all the special registers so we don't need
18 * to save them in the snapshot
20 flush_all_to_thread(current
);
28 void restore_processor_state(void)
31 switch_mmu_context(current
->active_mm
, current
->active_mm
, NULL
);