diff options
author | Paul Mackerras <paulus@samba.org> | 2007-05-08 13:37:51 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-08 13:37:51 +1000 |
commit | 02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch) | |
tree | 04ef573cd4de095c500c9fc3477f4278c0b36300 /arch/i386/power/suspend.c | |
parent | 7487a2245b8841c77ba9db406cf99a483b9334e9 (diff) | |
parent | 5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff) | |
download | kernel_samsung_smdk4412-02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1.zip kernel_samsung_smdk4412-02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1.tar.gz kernel_samsung_smdk4412-02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1.tar.bz2 |
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/i386/power/suspend.c')
-rw-r--r-- | arch/i386/power/suspend.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/i386/power/suspend.c b/arch/i386/power/suspend.c index db5e98d..a0020b9 100644 --- a/arch/i386/power/suspend.c +++ b/arch/i386/power/suspend.c @@ -16,6 +16,9 @@ /* Defined in arch/i386/power/swsusp.S */ extern int restore_image(void); +/* References to section boundaries */ +extern const void __nosave_begin, __nosave_end; + /* Pointer to the temporary resume page tables */ pgd_t *resume_pg_dir; @@ -156,3 +159,14 @@ int swsusp_arch_resume(void) restore_image(); return 0; } + +/* + * pfn_is_nosave - check if given pfn is in the 'nosave' section + */ + +int pfn_is_nosave(unsigned long pfn) +{ + unsigned long nosave_begin_pfn = __pa_symbol(&__nosave_begin) >> PAGE_SHIFT; + unsigned long nosave_end_pfn = PAGE_ALIGN(__pa_symbol(&__nosave_end)) >> PAGE_SHIFT; + return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn); +} |