Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / powerpc / kernel / swsusp.c
blob0050b2d2ff7ad004f7192f782615eb1ef5678562
1 /*
2 * Common powerpc suspend code for 32 and 64 bits
4 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include <linux/sched.h>
13 #include <linux/suspend.h>
14 #include <asm/current.h>
15 #include <asm/mmu_context.h>
16 #include <asm/switch_to.h>
18 void save_processor_state(void)
21 * flush out all the special registers so we don't need
22 * to save them in the snapshot
24 flush_all_to_thread(current);
26 #ifdef CONFIG_PPC64
27 hard_irq_disable();
28 #endif
32 void restore_processor_state(void)
34 #ifdef CONFIG_PPC32
35 switch_mmu_context(current->active_mm, current->active_mm, NULL);
36 #endif