-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 55002 b: refs/heads/master c: be9c94d h: refs/heads/master v: v3
- Loading branch information
Johannes Berg
authored and
Paul Mackerras
committed
May 2, 2007
1 parent
195d00d
commit ed9ece3
Showing
5 changed files
with
45 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: f88df14b1f15cdeffa060580a40c1ce3e13bb79e | ||
refs/heads/master: be9c94dd7776467813419f49fabe8017bc2d4c81 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Common powerpc suspend code for 32 and 64 bits | ||
* | ||
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version | ||
* 2 of the License, or (at your option) any later version. | ||
*/ | ||
|
||
#include <linux/sched.h> | ||
#include <asm/suspend.h> | ||
#include <asm/system.h> | ||
#include <asm/current.h> | ||
#include <asm/mmu_context.h> | ||
|
||
void save_processor_state(void) | ||
{ | ||
/* | ||
* flush out all the special registers so we don't need | ||
* to save them in the snapshot | ||
*/ | ||
flush_fp_to_thread(current); | ||
flush_altivec_to_thread(current); | ||
flush_spe_to_thread(current); | ||
} | ||
|
||
void restore_processor_state(void) | ||
{ | ||
#ifdef CONFIG_PPC32 | ||
set_context(current->active_mm->context.id, current->active_mm->pgd); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef __ASM_POWERPC_SUSPEND_H | ||
#define __ASM_POWERPC_SUSPEND_H | ||
|
||
static inline int arch_prepare_suspend(void) { return 0; } | ||
|
||
void save_processor_state(void); | ||
void restore_processor_state(void); | ||
|
||
#endif /* __ASM_POWERPC_SUSPEND_H */ |