 arch/i386/power/smp.c         |    4 ++--
 include/asm-i386/suspend2.h   |   14 +++++++-------
 include/asm-ppc/suspend2.h    |   14 +++++++-------
 include/asm-x86_64/suspend2.h |   14 +++++++-------
 kernel/power/atomic_copy.c    |   31 +++++++++++++++++--------------
 5 files changed, 40 insertions(+), 37 deletions(-)
diff -ruNp 802-arch-function-rename.patch-old/arch/i386/power/smp.c 802-arch-function-rename.patch-new/arch/i386/power/smp.c
--- 802-arch-function-rename.patch-old/arch/i386/power/smp.c	2005-07-21 04:13:31.000000000 +1000
+++ 802-arch-function-rename.patch-new/arch/i386/power/smp.c	2005-07-20 08:52:31.000000000 +1000
@@ -45,7 +45,7 @@ void __smp_suspend_lowlevel(void * data)
 	       	my_saved_context = (unsigned char *) (suspend2_saved_contexts + raw_smp_processor_id());
 		for (loop = sizeof(struct suspend2_saved_context); loop--; loop)
 			*(((unsigned char *) &suspend2_saved_context) + loop - 1) = *(my_saved_context + loop - 1);
-		suspend2_restore_processor_context();
+		suspend2_arch_restore_processor_context();
 #ifdef CONFIG_SMP
 		cpu_clear(raw_smp_processor_id(), per_cpu(cpu_tlbstate, raw_smp_processor_id()).active_mm->cpu_vm_mask);
 #endif
@@ -69,7 +69,7 @@ void __smp_suspend_lowlevel(void * data)
 			cpu_relax();
 			barrier();
 		}
-		suspend2_save_processor_context();
+		suspend2_arch_save_processor_context();
 		my_saved_context = (unsigned char *) (suspend2_saved_contexts + raw_smp_processor_id());
 		for (loop = sizeof(struct suspend2_saved_context); loop--; loop)
 			*(my_saved_context + loop - 1) = *(((unsigned char *) &suspend2_saved_context) + loop - 1);
diff -ruNp 802-arch-function-rename.patch-old/include/asm-i386/suspend2.h 802-arch-function-rename.patch-new/include/asm-i386/suspend2.h
--- 802-arch-function-rename.patch-old/include/asm-i386/suspend2.h	2005-07-21 04:13:31.000000000 +1000
+++ 802-arch-function-rename.patch-new/include/asm-i386/suspend2.h	2005-07-20 08:52:31.000000000 +1000
@@ -75,7 +75,7 @@ extern struct suspend2_saved_context sus
  * if anything changes, though, and make sure everything is going in the right
  * place. 
  */
-static inline void suspend2_save_processor_context(void)
+static inline void suspend2_arch_save_processor_context(void)
 {
 	kernel_fpu_begin();
 
@@ -322,7 +322,7 @@ static void save_and_set_irq_affinity(vo
 static void reset_irq_affinity(void) { };
 #endif
 
-static inline void suspend2_pre_copy(void)
+static inline void suspend2_arch_pre_copy(void)
 {
 	/*
 	 * Save the irq affinities before we freeze the
@@ -332,11 +332,11 @@ static inline void suspend2_pre_copy(voi
 	mtrr_save();
 }
 
-static inline void suspend2_post_copy(void)
+static inline void suspend2_arch_post_copy(void)
 {
 }
 
-static inline void suspend2_pre_copyback(void)
+static inline void suspend2_arch_pre_copyback(void)
 {
 	/* We want to run from swsusp_pg_dir, since swsusp_pg_dir is stored in
 	 * constant place in memory.
@@ -358,12 +358,12 @@ static inline void suspend2_pre_copyback
 	
 }
 
-static inline void suspend2_restore_processor_context(void)
+static inline void suspend2_arch_restore_processor_context(void)
 {
 	restore_processor_context();
 }
 	
-static inline void suspend2_flush_caches(void)
+static inline void suspend2_arch_flush_caches(void)
 {
 #ifdef CONFIG_SMP
 	cpu_clear(raw_smp_processor_id(), per_cpu(cpu_tlbstate,
@@ -374,7 +374,7 @@ static inline void suspend2_flush_caches
 	
 }
 
-static inline void suspend2_post_copyback(void)
+static inline void suspend2_arch_post_copyback(void)
 {
 	mtrr_restore_one_cpu();
 
diff -ruNp 802-arch-function-rename.patch-old/include/asm-ppc/suspend2.h 802-arch-function-rename.patch-new/include/asm-ppc/suspend2.h
--- 802-arch-function-rename.patch-old/include/asm-ppc/suspend2.h	2005-07-21 04:13:31.000000000 +1000
+++ 802-arch-function-rename.patch-new/include/asm-ppc/suspend2.h	2005-07-20 08:52:31.000000000 +1000
@@ -11,35 +11,35 @@
 
 static struct saved_context suspend_saved_context;
 
-static inline void suspend2_save_processor_context(void)
+static inline void suspend2_arch_save_processor_context(void)
 {
 	__save_processor_state(&suspend_saved_context);
 }
 
-static inline void suspend2_restore_processor_context(void)
+static inline void suspend2_arch_restore_processor_context(void)
 {
 	__restore_processor_state(&suspend_saved_context);
 
 	restore_context();
 }
 
-static inline void suspend2_pre_copy(void)
+static inline void suspend2_arch_pre_copy(void)
 {
 }
 
-static inline void suspend2_post_copy(void)
+static inline void suspend2_arch_post_copy(void)
 {
 }
 
-static inline void suspend2_pre_copyback(void)
+static inline void suspend2_arch_pre_copyback(void)
 {
 	save_context();
 }
 
-static inline void suspend2_post_copyback(void)
+static inline void suspend2_arch_post_copyback(void)
 {
 }
 
-static inline void suspend2_flush_caches(void)
+static inline void suspend2_arch_flush_caches(void)
 {
 }
diff -ruNp 802-arch-function-rename.patch-old/include/asm-x86_64/suspend2.h 802-arch-function-rename.patch-new/include/asm-x86_64/suspend2.h
--- 802-arch-function-rename.patch-old/include/asm-x86_64/suspend2.h	2005-07-21 04:13:31.000000000 +1000
+++ 802-arch-function-rename.patch-new/include/asm-x86_64/suspend2.h	2005-07-20 08:52:31.000000000 +1000
@@ -78,7 +78,7 @@ extern struct suspend2_saved_context sus
  * if anything changes, though, and make sure everything is going in the right
  * place. 
  */
-static inline void suspend2_save_processor_context(void)
+static inline void suspend2_arch_save_processor_context(void)
 {
 	/*
 	 * save the general registers.
@@ -355,7 +355,7 @@ static void save_and_set_irq_affinity(vo
 static void reset_irq_affinity(void) { };
 #endif
 
-static inline void suspend2_pre_copy(void)
+static inline void suspend2_arch_pre_copy(void)
 {
 	/*
 	 * Save the irq affinities before we freeze the
@@ -365,11 +365,11 @@ static inline void suspend2_pre_copy(voi
 	mtrr_save();
 }
 
-static inline void suspend2_post_copy(void)
+static inline void suspend2_arch_post_copy(void)
 {
 }
 
-static inline void suspend2_pre_copyback(void)
+static inline void suspend2_arch_pre_copyback(void)
 {
 
 	/* Send all IRQs to CPU 0. We will replace the saved affinities
@@ -394,12 +394,12 @@ static inline void suspend2_pre_copyback
 	__asm__( "movq	%rax,%cr3");
 }
 
-static inline void suspend2_restore_processor_context(void)
+static inline void suspend2_arch_restore_processor_context(void)
 {
 	restore_processor_context();
 }
 	
-static inline void suspend2_flush_caches(void)
+static inline void suspend2_arch_flush_caches(void)
 {
 #ifdef CONFIG_SMP
 	cpu_clear(_smp_processor_id(), per_cpu(cpu_tlbstate, _smp_processor_id()).active_mm->cpu_vm_mask);
@@ -409,7 +409,7 @@ static inline void suspend2_flush_caches
 	
 }
 
-static inline void suspend2_post_copyback(void)
+static inline void suspend2_arch_post_copyback(void)
 {
 	mtrr_restore_one_cpu();
 
diff -ruNp 802-arch-function-rename.patch-old/kernel/power/atomic_copy.c 802-arch-function-rename.patch-new/kernel/power/atomic_copy.c
--- 802-arch-function-rename.patch-old/kernel/power/atomic_copy.c	2005-07-21 04:13:31.000000000 +1000
+++ 802-arch-function-rename.patch-new/kernel/power/atomic_copy.c	2005-07-20 08:52:31.000000000 +1000
@@ -3,7 +3,7 @@
  * CPU enters this routine during suspend. All other CPUs enter
  * __smp_suspend_lowlevel. The one through
  * which the suspend is initiated (which, for simplicity, is always CPU 0)
- * sends the others here using an IPI during do_suspend2_suspend_1. They
+ * sends the others here using an IPI during do_suspend2_pre_copy. They
  * remain here until after the atomic copy of the kernel is made, to ensure
  * that they don't mess with memory in the meantime (even just idling will
  * do that). Once the atomic copy is made, they are free to carry on idling.
@@ -40,6 +40,7 @@
 #include "atomic_copy.h"
 #include "suspend2.h"
 #include "suspend2-smp.h"
+#include "checksum.h"
 
 volatile static int state1 __nosavedata = 0;
 volatile static int state2 __nosavedata = 0;
@@ -76,7 +77,7 @@ static void copyback_prepare(void)
 	memcpy(resume_commandline, saved_command_line, COMMAND_LINE_SIZE);
 
 	/* Arch specific preparation */
-	suspend2_pre_copyback();
+	suspend2_arch_pre_copyback();
 
 	suspend_message(SUSPEND_ANY_SECTION, SUSPEND_LOW, 1,
 			name_suspend "About to copy pageset1 back...\n");
@@ -114,7 +115,7 @@ static void copyback_post(void)
 	int loop;
 
 	/* Arch specific code */
-	suspend2_post_copyback();
+	suspend2_arch_post_copyback();
 
 	suspend_action = state1;
 	suspend_debug_state = state2;
@@ -149,14 +150,16 @@ static void copyback_post(void)
 
 
 /*
- * suspend2_suspend_1
+ * suspend2_pre_copy
  * Functionality   : Steps taken prior to saving CPU state and the image
  *                   itself.
  * Called From     : do_suspend2_lowlevel
  */
 
-static void suspend2_suspend_1(void)
+static void suspend2_pre_copy(void)
 {
+	suspend2_arch_pre_copy();
+
 	/* Save other cpu contexts */
 	smp_suspend();
 
@@ -172,7 +175,7 @@ static void suspend2_suspend_1(void)
 }
 
 /*
- * suspend2_suspend_2
+ * suspend2_post_copy
  * Functionality   : Steps taken after saving CPU state to save the
  *                   image and powerdown/reboot or recover on failure.
  * Key Assumptions : save_image returns zero on success; otherwise we need to
@@ -183,8 +186,10 @@ static void suspend2_suspend_1(void)
  */
 extern void suspend_power_down(void);
 
-static void suspend2_suspend_2(void)
+static void suspend2_post_copy(void)
 {
+	suspend2_arch_post_copy();
+
 	if (!save_image_part1()) {
 		suspend_power_down();
 
@@ -267,11 +272,9 @@ void do_suspend2_lowlevel(int resume)
 
 		suspend2_pre_copy();
 
-		suspend2_suspend_1();
-
-		suspend2_save_processor_context();	/* We need to capture registers and memory at "same time" */
+		suspend2_arch_save_processor_context();	/* We need to capture registers and memory at "same time" */
 
-		suspend2_suspend_2();		/* If everything goes okay, this function does not return */
+		suspend2_post_copy();		/* If everything goes okay, this function does not return */
 		return;
 	}
 	
@@ -295,15 +298,15 @@ void do_suspend2_lowlevel(int resume)
 
 	copyback_low(); /* 0 = use logical addresses */
 	
-	suspend2_restore_processor_context();
-	suspend2_flush_caches();
+	suspend2_arch_restore_processor_context();
+	suspend2_arch_flush_caches();
 
 	suspend2_checksum_print_differences();
 
 	/* Now we are running with our old stack, and with registers copied
 	 * from suspend time. Let's copy back those remaining highmem pages. */
 	copyback_high();
-	suspend2_flush_caches();
+	suspend2_arch_flush_caches();
 
 	copyback_post();
 }

