Exemplo n.º 1
0
asmlinkage int swsusp_arch_resume(void)
{
	int error;

	resume_pg_dir = (pgd_t *)get_safe_page(GFP_ATOMIC);
	if (!resume_pg_dir)
		return -ENOMEM;

	resume_init_first_level_page_table(resume_pg_dir);

	error = set_up_temporary_text_mapping(resume_pg_dir);
	if (error)
		return error;

	error = resume_physical_mapping_init(resume_pg_dir);
	if (error)
		return error;

	temp_pgt = __pa(resume_pg_dir);

	error = relocate_restore_code();
	if (error)
		return error;

	/* We have got enough memory and from now on we cannot recover */
	restore_image();
	return 0;
}
Exemplo n.º 2
0
int swsusp_arch_resume(void)
{
	int error;

	/* We have got enough memory and from now on we cannot recover */
	error = set_up_temporary_mappings();
	if (error)
		return error;

	error = relocate_restore_code();
	if (error)
		return error;

	restore_image();
	return 0;
}