0001
0002
0003
0004
0005
0006
0007
0008 #include <linux/sched.h>
0009 #include <linux/suspend.h>
0010 #include <asm/current.h>
0011 #include <asm/mmu_context.h>
0012 #include <asm/switch_to.h>
0013
0014 void save_processor_state(void)
0015 {
0016
0017
0018
0019
0020 flush_all_to_thread(current);
0021
0022 #ifdef CONFIG_PPC64
0023 hard_irq_disable();
0024 #endif
0025
0026 }
0027
0028 void restore_processor_state(void)
0029 {
0030 #ifdef CONFIG_PPC32
0031 switch_mmu_context(current->active_mm, current->active_mm, NULL);
0032 #endif
0033 }