PageRenderTime 11ms CodeModel.GetById 9ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/arch/sh/kernel/swsusp.c

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35
C | 38 lines | 23 code | 6 blank | 9 comment | 1 complexity | 4568f3568e00ae4dc3b21224a9c72b98 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1/*
 2 * swsusp.c - SuperH hibernation support
 3 *
 4 * Copyright (C) 2009 Magnus Damm
 5 *
 6 * This file is subject to the terms and conditions of the GNU General Public
 7 * License.  See the file "COPYING" in the main directory of this archive
 8 * for more details.
 9 */
10
11#include <linux/mm.h>
12#include <linux/sched.h>
13#include <linux/suspend.h>
14#include <asm/suspend.h>
15#include <asm/sections.h>
16#include <asm/tlbflush.h>
17#include <asm/page.h>
18#include <asm/fpu.h>
19
20struct swsusp_arch_regs swsusp_arch_regs_cpu0;
21
22int pfn_is_nosave(unsigned long pfn)
23{
24	unsigned long begin_pfn = __pa(&__nosave_begin) >> PAGE_SHIFT;
25	unsigned long end_pfn = PAGE_ALIGN(__pa(&__nosave_end)) >> PAGE_SHIFT;
26
27	return (pfn >= begin_pfn) && (pfn < end_pfn);
28}
29
30void save_processor_state(void)
31{
32	init_fpu(current);
33}
34
35void restore_processor_state(void)
36{
37	local_flush_tlb_all();
38}