Commit ea7d406d authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] suspend-to-disk: cleanup printks(), rearrange reading

I'd like Florent credited -- he is maintaining 2.4.X version and
helping with development. Kill warnings by rearranging code / adding
prototypes. Enable using separate console (so user sees progress and X
suspend/resume works properly), forward-port of updates from Florent
and stop using own PRINTK stuff (mostly). Reading now primarily uses
block_device(), this should enable more cleanups. Fixed double free on
error path.
parent e80e317b
......@@ -502,6 +502,14 @@ S: 48287 Sawleaf
S: Fremont, California 94539
S: USA
N: Florent Chabaud
E: florent.chabaud@polytechnique.org
D: software suspend
S: SGDN/DCSSI/SDS/LTI
S: 58, Bd Latour-Maubourg
S: 75700 Paris 07 SP
S: France
N: Gordon Chaffee
E: chaffee@cs.berkeley.edu
W: http://bmrc.berkeley.edu/people/chaffee/
......@@ -1708,7 +1716,7 @@ S: Germany
N: Gabor Kuti
M: seasons@falcon.sch.bme.hu
M: seasons@makosteszta.sote.hu
D: Software suspend
D: Original author of software suspend
N: Jaroslav Kysela
E: perex@suse.cz
......
......@@ -97,6 +97,14 @@ static inline void save_processor_context (void)
asm volatile ("pushfl ; popl (%0)" : "=m" (saved_context.eflags));
}
static void
do_fpu_end(void)
{
/* restore FPU regs if necessary */
/* Do it out of line so that gcc does not move cr0 load to some stupid place */
kernel_fpu_end();
}
/*
* restore_processor_context
*
......@@ -220,13 +228,6 @@ void fix_processor_context(void)
}
static void
do_fpu_end(void)
{
/* restore FPU regs if necessary */
/* Do it out of line so that gcc does not move cr0 load to some stupid place */
kernel_fpu_end();
}
#ifdef CONFIG_SOFTWARE_SUSPEND
/* Local variables for do_magic */
......
......@@ -38,7 +38,6 @@ struct saved_context {
: /* no output */ \
:"r" ((thread)->debugreg[register]))
extern void do_fpu_end(void);
extern void fix_processor_context(void);
extern void do_magic(int resume);
......
......@@ -56,9 +56,22 @@ extern int register_suspend_notifier(struct notifier_block *);
extern int unregister_suspend_notifier(struct notifier_block *);
extern void refrigerator(unsigned long);
extern int freeze_processes(void);
extern void thaw_processes(void);
extern unsigned int nr_copy_pages __nosavedata;
extern suspend_pagedir_t *pagedir_nosave __nosavedata;
/* Communication between kernel/suspend.c and arch/i386/suspend.c */
extern void do_magic_resume_1(void);
extern void do_magic_resume_2(void);
extern void do_magic_suspend_1(void);
extern void do_magic_suspend_2(void);
/* Communication between acpi and arch/i386/suspend.c */
extern void do_suspend_lowlevel(int resume);
#else
#define software_suspend() do { } while(0)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment