Skip to contentSkip to conversation

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

PATCH Pavel Machek 1 participant 1 message Jul 9, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi!

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. Please apply,
Pavel

CREDITS +9 -1
@@ -502,6 +502,14 @@
 S: Fremont, California 94539
 S: USA
 
+N: Florent Chabaud
+E: [email protected]
+D: software suspend
+S: SGDN/DCSSI/SDS/LTI
+S: 58, Bd Latour-Maubourg
+S: 75700 Paris 07 SP
+S: France
+
 N: Gordon Chaffee
 E: [email protected]
 W: http://bmrc.berkeley.edu/people/chaffee/
@@ -1708,7 +1716,7 @@
 N: Gabor Kuti
 M: [email protected]
 M: [email protected]
-D: Software suspend
+D: Original author of software suspend
 
 N: Jaroslav Kysela
 E: [email protected]
arch/i386/kernel/suspend.c +8 -7
@@ -97,6 +97,14 @@
 	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 @@
 
 }
 
-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 */
include/asm-i386/suspend.h +0 -1
@@ -38,7 +38,6 @@
                        : /* no output */ \
                        :"r" ((thread)->debugreg[register]))
 
-extern void do_fpu_end(void);
 extern void fix_processor_context(void);
 extern void do_magic(int resume);
 
include/linux/suspend.h +13 -0
@@ -56,9 +56,22 @@
 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)
kernel/suspend.c +173 -174

718 lines not on this page · raw message

Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?