rpms/kernel/devel linux-2.6-powermac-generic-suspend-2.patch, 1.1, 1.2

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Apr 4 20:51:57 UTC 2007


Author: dwmw2

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv24200

Modified Files:
	linux-2.6-powermac-generic-suspend-2.patch 
Log Message:
fixed version

linux-2.6-powermac-generic-suspend-2.patch:
 arch/powerpc/kernel/Makefile            |    1 
 arch/powerpc/platforms/powermac/setup.c |   65 --------------------------------
 linux-2.6/arch/powerpc/kernel/swsusp.c  |   42 ++++++++++++++++++++
 linux-2.6/include/asm-powerpc/suspend.h |    9 ++++
 4 files changed, 52 insertions(+), 65 deletions(-)

Index: linux-2.6-powermac-generic-suspend-2.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-powermac-generic-suspend-2.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-powermac-generic-suspend-2.patch	25 Mar 2007 21:38:09 -0000	1.1
+++ linux-2.6-powermac-generic-suspend-2.patch	4 Apr 2007 20:51:55 -0000	1.2
@@ -1,37 +1,43 @@
-From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Mon Mar 19 11:04:08 2007
+From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Mon Mar 19 16:24:54 2007
 Return-path: <linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org>
 Envelope-to: dwmw2 at baythorne.infradead.org
-Delivery-date: Mon, 19 Mar 2007 11:04:08 +0000
+Delivery-date: Mon, 19 Mar 2007 16:24:54 +0000
 Received: from pentafluge.infradead.org ([2001:4bd0:203e::1]) by
 	baythorne.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id
-	1HTFel-0004m2-2j for dwmw2 at baythorne.infradead.org; Mon, 19 Mar 2007
-	11:04:08 +0000
+	1HTKfG-0005cX-Fv for dwmw2 at baythorne.infradead.org; Mon, 19 Mar 2007
+	16:24:54 +0000
 Received: from ozlabs.org ([203.10.76.45]) by pentafluge.infradead.org with
-	esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1HTFeW-0004sA-8R for
-	dwmw2 at infradead.org; Mon, 19 Mar 2007 11:03:50 +0000
+	esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1HTKfD-0007pQ-Md for
+	dwmw2 at infradead.org; Mon, 19 Mar 2007 16:24:53 +0000
 Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix)
-	with ESMTP id 5D670DE74F for <dwmw2 at infradead.org>; Mon, 19 Mar 2007
-	22:00:33 +1100 (EST)
+	with ESMTP id C123CDE064 for <dwmw2 at infradead.org>; Tue, 20 Mar 2007
+	03:24:47 +1100 (EST)
 X-Original-To: linuxppc-dev at ozlabs.org
 Delivered-To: linuxppc-dev at ozlabs.org
 Received: from sipsolutions.net (crystal.sipsolutions.net [195.210.38.204])
 	(using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present
-	a certificate) by ozlabs.org (Postfix) with ESMTP id 008D4DE014 for
-	<linuxppc-dev at ozlabs.org>; Mon, 19 Mar 2007 21:59:30 +1100 (EST)
+	a certificate) by ozlabs.org (Postfix) with ESMTP id 8898FDDFB1 for
+	<linuxppc-dev at ozlabs.org>; Tue, 20 Mar 2007 03:24:32 +1100 (EST)
 Received: from [84.135.242.137] (helo=[10.0.0.4]) by sipsolutions.net with
 	esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.63) (envelope-from
-	<johannes at sipsolutions.net>) id 1HTFV9-00034W-7R; Mon, 19 Mar 2007 10:54:08
+	<johannes at sipsolutions.net>) id 1HTKZf-0004vB-Ld; Mon, 19 Mar 2007 16:19:08
 	+0000
-Message-Id: <20070319105358.796834000 at sipsolutions.net>
-References: <20070319105352.771599000 at sipsolutions.net>
-User-Agent: quilt/0.45-1
-Date: Mon, 19 Mar 2007 11:53:54 +0100
-From: Johannes Berg <johannes at sipsolutions.net>
-To: linuxppc-dev at ozlabs.org
 Subject: [PATCH 2/5] powerpc: fix suspend states again
-Content-Disposition: inline; filename=002-fix-powermac-suspend-again.patch
+From: Johannes Berg <johannes at sipsolutions.net>
+To: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+In-Reply-To: <1174319657.22561.9.camel at johannes.berg>
+References: <20070319105352.771599000 at sipsolutions.net>
+	 <20070319105358.796834000 at sipsolutions.net>
+	 <1174315727.5044.6.camel at localhost.localdomain>
+	 <1174317726.22561.4.camel at johannes.berg>
+	 <1174318342.5044.16.camel at localhost.localdomain>
+	 <1174319146.22561.6.camel at johannes.berg>
+	 <1174319657.22561.9.camel at johannes.berg>
+Date: Mon, 19 Mar 2007 17:22:30 +0100
+Message-Id: <1174321350.22561.11.camel at johannes.berg>
 Mime-Version: 1.0
 X-Mailer: Evolution 2.8.2.1 
+Cc: linuxppc-dev at ozlabs.org
 X-BeenThere: linuxppc-dev at ozlabs.org
 X-Mailman-Version: 2.1.9
 Precedence: list
@@ -46,9 +52,9 @@
 Content-Type: text/plain; charset="us-ascii"
 Sender: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
 Errors-To: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
-X-Bad-Reply: References but no 'Re:' in Subject.
+X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject.
 X-Spam-Score: 0.0 (/)
-X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
+X-Evolution-Source: imap://dwmw2@baythorne.infradead.org/
 Content-Transfer-Encoding: 8bit
 
 In commit 0fba3a1f39f8b0a50b56c8b068fa52131cbc84c2 (a very long time ago,
@@ -69,30 +75,29 @@
 This patch addresses these points as follows:
  1. remove all pm_ops from powermac, powermac suspend to ram isn't currently
     usable via /sys/power/state but is done via the PMU instead.
- 2. move the code responsible for storing FPU/altivec state into a new
-    arch_prepare_suspend function (previously, this was only present for
-    32-bit platforms from asm-ppc.)
+ 2. move the code responsible for storing FPU/altivec state into
+    save_processor_state and the set_context() call to restore_processor_state.
 
-A follow-on patch will create new pm_ops for via-pmu.
+It also adds a call to kernel_enable_spe() but I don't have any machines that
+have that to see if it actually works anyway.
 
-I removed
-	set_context(current->active_mm->context.id, current->active_mm->pgd);
-because
- 1. it works without and
- 2. I don't see the point
+It may look like there is some code removal missing but that is actually because
+the new suspend.h file overrides the ppc/suspend.h one which was previously used.
+
+A follow-on patch will create new pm_ops for via-pmu.
 
 Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
 Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
 
 ---
  arch/powerpc/kernel/Makefile            |    1 
- arch/powerpc/kernel/swsusp.c            |   26 ++++++++++++
+ arch/powerpc/kernel/swsusp.c            |   42 ++++++++++++++++++++
  arch/powerpc/platforms/powermac/setup.c |   65 --------------------------------
  include/asm-powerpc/suspend.h           |    9 ++++
- 4 files changed, 36 insertions(+), 65 deletions(-)
+ 4 files changed, 52 insertions(+), 65 deletions(-)
 
---- linux-2.6.orig/arch/powerpc/platforms/powermac/setup.c	2007-03-19 11:47:26.622413925 +0100
-+++ linux-2.6/arch/powerpc/platforms/powermac/setup.c	2007-03-19 11:47:39.132413925 +0100
+--- linux-2.6.orig/arch/powerpc/platforms/powermac/setup.c	2007-03-19 16:49:57.723321419 +0100
++++ linux-2.6/arch/powerpc/platforms/powermac/setup.c	2007-03-19 16:50:00.983321419 +0100
 @@ -420,76 +420,11 @@ static void __init find_boot_device(void
  #endif
  }
@@ -171,7 +176,7 @@
  }
  
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6/include/asm-powerpc/suspend.h	2007-03-19 11:47:39.132413925 +0100
++++ linux-2.6/include/asm-powerpc/suspend.h	2007-03-19 16:50:00.993321419 +0100
 @@ -0,0 +1,9 @@
 +#ifndef __ASM_POWERPC_SUSPEND_H
 +#define __ASM_POWERPC_SUSPEND_H
@@ -179,11 +184,11 @@
 +static inline int arch_prepare_suspend(void) { return 0; }
 +
 +void save_processor_state(void);
-+static inline void restore_processor_state(void) {}
++void restore_processor_state(void);
 +
 +#endif /* __ASM_POWERPC_SUSPEND_H */
---- linux-2.6.orig/arch/powerpc/kernel/Makefile	2007-03-19 11:47:26.692413925 +0100
-+++ linux-2.6/arch/powerpc/kernel/Makefile	2007-03-19 11:47:39.172413925 +0100
+--- linux-2.6.orig/arch/powerpc/kernel/Makefile	2007-03-19 16:49:57.743321419 +0100
++++ linux-2.6/arch/powerpc/kernel/Makefile	2007-03-19 16:50:00.993321419 +0100
 @@ -36,6 +36,7 @@ obj-$(CONFIG_GENERIC_TBSYNC)	+= smp-tbsy
  obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
  obj-$(CONFIG_6xx)		+= idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
@@ -193,8 +198,8 @@
  obj32-$(CONFIG_MODULES)		+= module_32.o
  
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6/arch/powerpc/kernel/swsusp.c	2007-03-19 11:47:39.172413925 +0100
-@@ -0,0 +1,26 @@
++++ linux-2.6/arch/powerpc/kernel/swsusp.c	2007-03-19 17:18:25.323321419 +0100
+@@ -0,0 +1,42 @@
 +/*
 + * Common powerpc suspend code for 32 and 64 bits
 + *
@@ -203,11 +208,18 @@
 + * GPLv2
 + */
 +
++#include <linux/sched.h>
++#include <asm/suspend.h>
 +#include <asm/cputable.h>
 +#include <asm/system.h>
++#include <asm/current.h>
++#include <asm/mmu_context.h>
 +
++#ifdef CONFIG_SPE
++extern void enable_kernel_spe(void);
++#endif
 +
-+int save_processor_state(void)
++void save_processor_state(void)
 +{
 +	/* Giveup the lazy FPU & vec so we don't have to back them
 +	 * up from the low level code
@@ -219,10 +231,18 @@
 +		enable_kernel_altivec();
 +#endif /* CONFIG_ALTIVEC */
 +
-+	return 0;
++#ifdef CONFIG_SPE
++	enable_kernel_spe();
++#endif
++}
++
++void restore_processor_state(void)
++{
++#ifdef CONFIG_PPC32
++	set_context(current->active_mm->context.id, current->active_mm->pgd);
++#endif
 +}
 
---
 
 _______________________________________________
 Linuxppc-dev mailing list




More information about the fedora-cvs-commits mailing list