kvm tools, setup: Create private directory
[linux-2.6/next.git] / arch / powerpc / kernel / swsusp.c
blobaa17b76dd42799375ce954490526b00e5262de06
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 <asm/system.h>
14 #include <asm/current.h>
15 #include <asm/mmu_context.h>
17 void save_processor_state(void)
20 * flush out all the special registers so we don't need
21 * to save them in the snapshot
23 flush_fp_to_thread(current);
24 flush_altivec_to_thread(current);
25 flush_spe_to_thread(current);
27 #ifdef CONFIG_PPC64
28 hard_irq_disable();
29 #endif
33 void restore_processor_state(void)
35 #ifdef CONFIG_PPC32
36 switch_mmu_context(NULL, current->active_mm);
37 #endif