rpms/kernel/devel linux-2.6-fix-pmops-4.patch, NONE, 1.1 kernel-2.6.spec, 1.3046, 1.3047 linux-2.6-powermac-generic-suspend-1.patch, 1.1, 1.2 linux-2.6-powermac-generic-suspend-2.patch, 1.2, 1.3 linux-2.6-powermac-generic-suspend-3.patch, 1.1, 1.2 linux-2.6-powermac-generic-suspend-4.patch, 1.1, 1.2

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Apr 5 18:37:20 UTC 2007


Author: dwmw2

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

Modified Files:
	kernel-2.6.spec linux-2.6-powermac-generic-suspend-1.patch 
	linux-2.6-powermac-generic-suspend-2.patch 
	linux-2.6-powermac-generic-suspend-3.patch 
	linux-2.6-powermac-generic-suspend-4.patch 
Added Files:
	linux-2.6-fix-pmops-4.patch 
Log Message:
Fix pmac generic suspend


linux-2.6-fix-pmops-4.patch:
 include/linux/pm.h  |   10 ++++++++++
 kernel/power/main.c |   10 ++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-fix-pmops-4.patch ---
---
 include/linux/pm.h  |   10 ++++++++++
 kernel/power/main.c |   10 ++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

--- wireless-dev.orig/include/linux/pm.h	2007-04-05 18:14:07.948549941 +0200
+++ wireless-dev/include/linux/pm.h	2007-04-05 18:14:13.568549941 +0200
@@ -131,9 +131,17 @@ typedef int __bitwise suspend_disk_metho
  * @prepare: Prepare the platform for the given suspend state. Can return a
  *	negative error code if necessary.
  *
+ * @irq_off: If assigned, the generic suspend code does not turn off IRQs
+ *	but relies on this callback instead. It is currently not called for
+ *	%PM_SUSPEND_DISK.
+ *
  * @enter: Enter the given suspend state, must be assigned. Can return a
  *	negative error code if necessary.
  *
+ * @irq_on: If assigned, the generic suspend code does not turn on IRQs
+ *	but relies on this callback instead. it is currently not called for
+ *	%PM_SUSPEND_DISK.
+ *
  * @finish: Called when the system has left the given state and all devices
  *	are resumed. The return value is ignored.
  *
@@ -152,7 +160,9 @@ typedef int __bitwise suspend_disk_metho
 struct pm_ops {
 	int (*valid)(suspend_state_t state);
 	int (*prepare)(suspend_state_t state);
+	void (*irq_off)(suspend_state_t state);
 	int (*enter)(suspend_state_t state);
+	void (*irq_on)(suspend_state_t state);
 	int (*finish)(suspend_state_t state);
 	suspend_disk_method_t pm_disk_mode;
 };
--- wireless-dev.orig/kernel/power/main.c	2007-04-05 18:14:07.988549941 +0200
+++ wireless-dev/kernel/power/main.c	2007-04-05 18:25:21.108549941 +0200
@@ -117,7 +117,10 @@ int suspend_enter(suspend_state_t state)
 	int error = 0;
 	unsigned long flags;
 
-	local_irq_save(flags);
+	if (pm_ops->irq_off)
+		pm_ops->irq_off(state);
+	else
+		local_irq_save(flags);
 
 	if ((error = device_power_down(PMSG_SUSPEND))) {
 		printk(KERN_ERR "Some devices failed to power down\n");
@@ -126,7 +129,10 @@ int suspend_enter(suspend_state_t state)
 	error = pm_ops->enter(state);
 	device_power_up();
  Done:
-	local_irq_restore(flags);
+	if (pm_ops->irq_on)
+		pm_ops->irq_on(state);
+	else
+		local_irq_restore(flags);
 	return error;
 }
 


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3046
retrieving revision 1.3047
diff -u -r1.3046 -r1.3047
--- kernel-2.6.spec	5 Apr 2007 05:50:45 -0000	1.3046
+++ kernel-2.6.spec	5 Apr 2007 18:37:18 -0000	1.3047
@@ -320,9 +320,6 @@
 BuildPreReq: gnupg
 %endif
 BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
-%if %{with_headers}
-BuildRequires: unifdef
-%endif
 BuildConflicts: rhbuildsys(DiskFree) < 500Mb
 
 
@@ -388,6 +385,7 @@
 Patch16: linux-2.6-fix-pmops-1.patch
 Patch17: linux-2.6-fix-pmops-2.patch
 Patch18: linux-2.6-fix-pmops-3.patch
+Patch19: linux-2.6-fix-pmops-4.patch
 
 # enable sysrq-c on all kernels, not only kexec
 Patch20: linux-2.6-sysrq-c.patch
@@ -984,6 +982,7 @@
 %patch16 -p1
 %patch17 -p1
 %patch18 -p1
+%patch19 -p1
 
 # sysrq works always
 %patch20 -p1
@@ -2252,6 +2251,9 @@
 #  - tux.
 
 %changelog
+* Thu Apr 05 2007 David Woodhouse <dwmw2 at redhat.com>
+- Fix PowerMac generic suspend vs. IRQ disable
+
 * Thu Apr 05 2007 Dave Jones <davej at redhat.com>
 - Disable some warnings.
 

linux-2.6-powermac-generic-suspend-1.patch:
 arch/powerpc/Kconfig                     |    5 ++
 arch/powerpc/platforms/powermac/time.c   |   38 ----------------
 arch/powerpc/sysdev/Makefile             |    3 +
 wireless-dev/arch/powerpc/sysdev/timer.c |   70 +++++++++++++++++++++++++++++++
 4 files changed, 78 insertions(+), 38 deletions(-)

Index: linux-2.6-powermac-generic-suspend-1.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-powermac-generic-suspend-1.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-powermac-generic-suspend-1.patch	25 Mar 2007 21:38:09 -0000	1.1
+++ linux-2.6-powermac-generic-suspend-1.patch	5 Apr 2007 18:37:18 -0000	1.2
@@ -1,55 +1,4 @@
-From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Mon Mar 19 11:03:04 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:03:04 +0000
-Received: from pentafluge.infradead.org ([2001:4bd0:203e::1]) by
-	baythorne.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id
-	1HTFdm-0004lo-UL for dwmw2 at baythorne.infradead.org; Mon, 19 Mar 2007
-	11:03:04 +0000
-Received: from ozlabs.org ([203.10.76.45]) by pentafluge.infradead.org with
-	esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1HTFdd-0004rJ-Fr for
-	dwmw2 at infradead.org; Mon, 19 Mar 2007 11:02:55 +0000
-Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix)
-	with ESMTP id DC64FDDEC0 for <dwmw2 at infradead.org>; Mon, 19 Mar 2007
-	22:00:19 +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 42C2FDDFDD for
-	<linuxppc-dev at ozlabs.org>; Mon, 19 Mar 2007 21:59:28 +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 1HTFV5-00034S-Ty; Mon, 19 Mar 2007 10:54:04
-	+0000
-Message-Id: <20070319105357.964696000 at sipsolutions.net>
-References: <20070319105352.771599000 at sipsolutions.net>
-User-Agent: quilt/0.45-1
-Date: Mon, 19 Mar 2007 11:53:53 +0100
-From: Johannes Berg <johannes at sipsolutions.net>
-To: linuxppc-dev at ozlabs.org
-Subject: [PATCH 1/5] powerpc: generic time suspend/resume code
-Content-Disposition: inline; filename=001-time-resume.patch
-Mime-Version: 1.0
-X-Mailer: Evolution 2.8.2.1 
-X-BeenThere: linuxppc-dev at ozlabs.org
-X-Mailman-Version: 2.1.9
-Precedence: list
-List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>
-List-Unsubscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
-	<mailto:linuxppc-dev-request at ozlabs.org?subject=unsubscribe>
-List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev>
-List-Post: <mailto:linuxppc-dev at ozlabs.org>
-List-Help: <mailto:linuxppc-dev-request at ozlabs.org?subject=help>
-List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
-	<mailto:linuxppc-dev-request at ozlabs.org?subject=subscribe>
-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-Spam-Score: 0.0 (/)
-X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
-Content-Transfer-Encoding: 8bit
+Subject: [PATCH] powerpc: generic time suspend/resume code
 
 This patch removes the time suspend/restore code that was done through
 a PMU notifier in arch/platforms/powermac/time.c.
@@ -70,8 +19,8 @@
  arch/powerpc/sysdev/timer.c            |   70 +++++++++++++++++++++++++++++++++
  4 files changed, 78 insertions(+), 38 deletions(-)
 
---- linux-2.6.orig/arch/powerpc/platforms/powermac/time.c	2007-03-19 11:47:27.312413925 +0100
-+++ linux-2.6/arch/powerpc/platforms/powermac/time.c	2007-03-19 11:47:37.512413925 +0100
+--- wireless-dev.orig/arch/powerpc/platforms/powermac/time.c	2007-04-05 14:31:28.928552246 +0200
++++ wireless-dev/arch/powerpc/platforms/powermac/time.c	2007-04-05 14:31:45.778552246 +0200
 @@ -297,49 +297,11 @@ int __init via_calibrate_decr(void)
  }
  #endif
@@ -122,8 +71,8 @@
  	generic_calibrate_decr();
  
  #ifdef CONFIG_PPC32
---- linux-2.6.orig/arch/powerpc/Kconfig	2007-03-19 11:47:27.422413925 +0100
-+++ linux-2.6/arch/powerpc/Kconfig	2007-03-19 11:47:37.512413925 +0100
+--- wireless-dev.orig/arch/powerpc/Kconfig	2007-04-05 14:31:28.988552246 +0200
++++ wireless-dev/arch/powerpc/Kconfig	2007-04-05 14:31:45.778552246 +0200
 @@ -11,6 +11,11 @@ config PPC64
  	  This option selects whether a 32-bit or a 64-bit kernel
  	  will be built.
@@ -136,8 +85,8 @@
  config PPC32
  	bool
  	default y if !PPC64
---- linux-2.6.orig/arch/powerpc/sysdev/Makefile	2007-03-19 11:47:27.532413925 +0100
-+++ linux-2.6/arch/powerpc/sysdev/Makefile	2007-03-19 11:47:37.512413925 +0100
+--- wireless-dev.orig/arch/powerpc/sysdev/Makefile	2007-04-05 14:31:29.008552246 +0200
++++ wireless-dev/arch/powerpc/sysdev/Makefile	2007-04-05 14:31:45.778552246 +0200
 @@ -14,6 +14,9 @@ obj-$(CONFIG_FSL_SOC)		+= fsl_soc.o
  obj-$(CONFIG_TSI108_BRIDGE)	+= tsi108_pci.o tsi108_dev.o
  obj-$(CONFIG_QUICC_ENGINE)	+= qe_lib/
@@ -149,7 +98,7 @@
  obj-$(CONFIG_PPC_I8259)		+= i8259.o
  obj-$(CONFIG_PPC_83xx)		+= ipic.o
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6/arch/powerpc/sysdev/timer.c	2007-03-19 11:47:37.512413925 +0100
++++ wireless-dev/arch/powerpc/sysdev/timer.c	2007-04-05 14:31:45.778552246 +0200
 @@ -0,0 +1,70 @@
 +/*
 + * Common code to keep time when machine suspends.
@@ -221,10 +170,3 @@
 +}
 +
 +device_initcall(time_init_device);
-
---
-
-_______________________________________________
-Linuxppc-dev mailing list
-Linuxppc-dev at ozlabs.org
-https://ozlabs.org/mailman/listinfo/linuxppc-dev

linux-2.6-powermac-generic-suspend-2.patch:
 arch/powerpc/kernel/Makefile               |    1 
 arch/powerpc/platforms/powermac/setup.c    |   65 -----------------------------
 wireless-dev/arch/powerpc/kernel/swsusp.c  |   42 ++++++++++++++++++
 wireless-dev/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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-powermac-generic-suspend-2.patch	4 Apr 2007 20:51:55 -0000	1.2
+++ linux-2.6-powermac-generic-suspend-2.patch	5 Apr 2007 18:37:18 -0000	1.3
@@ -1,61 +1,4 @@
-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 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
-	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 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 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 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 1HTKZf-0004vB-Ld; Mon, 19 Mar 2007 16:19:08
-	+0000
-Subject: [PATCH 2/5] powerpc: fix suspend states again
-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
-List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>
-List-Unsubscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
-	<mailto:linuxppc-dev-request at ozlabs.org?subject=unsubscribe>
-List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev>
-List-Post: <mailto:linuxppc-dev at ozlabs.org>
-List-Help: <mailto:linuxppc-dev-request at ozlabs.org?subject=help>
-List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
-	<mailto:linuxppc-dev-request at ozlabs.org?subject=subscribe>
-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 and In-Reply-To but no 'Re:' in Subject.
-X-Spam-Score: 0.0 (/)
-X-Evolution-Source: imap://dwmw2@baythorne.infradead.org/
-Content-Transfer-Encoding: 8bit
+Subject: [PATCH] powerpc: fix suspend states again
 
 In commit 0fba3a1f39f8b0a50b56c8b068fa52131cbc84c2 (a very long time ago,
 May 2006), I fixed a bug that caused powermacs to crash when you tried
@@ -77,9 +20,7 @@
     usable via /sys/power/state but is done via the PMU instead.
  2. move the code responsible for storing FPU/altivec state into
     save_processor_state and the set_context() call to restore_processor_state.
-
-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.
+ 3. add a call to kernel_enable_spe()
 
 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.
@@ -96,8 +37,8 @@
  include/asm-powerpc/suspend.h           |    9 ++++
  4 files changed, 52 insertions(+), 65 deletions(-)
 
---- 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
+--- wireless-dev.orig/arch/powerpc/platforms/powermac/setup.c	2007-04-05 14:31:28.448552246 +0200
++++ wireless-dev/arch/powerpc/platforms/powermac/setup.c	2007-04-05 14:31:46.488552246 +0200
 @@ -420,76 +420,11 @@ static void __init find_boot_device(void
  #endif
  }
@@ -176,7 +117,7 @@
  }
  
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6/include/asm-powerpc/suspend.h	2007-03-19 16:50:00.993321419 +0100
++++ wireless-dev/include/asm-powerpc/suspend.h	2007-04-05 14:31:46.488552246 +0200
 @@ -0,0 +1,9 @@
 +#ifndef __ASM_POWERPC_SUSPEND_H
 +#define __ASM_POWERPC_SUSPEND_H
@@ -187,8 +128,8 @@
 +void restore_processor_state(void);
 +
 +#endif /* __ASM_POWERPC_SUSPEND_H */
---- 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
+--- wireless-dev.orig/arch/powerpc/kernel/Makefile	2007-04-05 14:31:28.468552246 +0200
++++ wireless-dev/arch/powerpc/kernel/Makefile	2007-04-05 14:31:46.488552246 +0200
 @@ -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
@@ -198,7 +139,7 @@
  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 17:18:25.323321419 +0100
++++ wireless-dev/arch/powerpc/kernel/swsusp.c	2007-04-05 14:31:46.488552246 +0200
 @@ -0,0 +1,42 @@
 +/*
 + * Common powerpc suspend code for 32 and 64 bits
@@ -242,9 +183,3 @@
 +	set_context(current->active_mm->context.id, current->active_mm->pgd);
 +#endif
 +}
-
-
-_______________________________________________
-Linuxppc-dev mailing list
-Linuxppc-dev at ozlabs.org
-https://ozlabs.org/mailman/listinfo/linuxppc-dev

linux-2.6-powermac-generic-suspend-3.patch:
 drivers/macintosh/adb.c             |   42 +++++++-----------------------------
 drivers/macintosh/apm_emu.c         |   13 +++--------
 drivers/macintosh/via-pmu-led.c     |    4 ---
 drivers/macintosh/via-pmu.c         |   36 +++++-------------------------
 include/linux/pmu.h                 |   12 +---------
 sound/oss/dmasound/dmasound_awacs.c |    5 +---
 6 files changed, 24 insertions(+), 88 deletions(-)

Index: linux-2.6-powermac-generic-suspend-3.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-powermac-generic-suspend-3.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-powermac-generic-suspend-3.patch	25 Mar 2007 21:38:09 -0000	1.1
+++ linux-2.6-powermac-generic-suspend-3.patch	5 Apr 2007 18:37:18 -0000	1.2
@@ -1,56 +1,4 @@
-From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Mon Mar 19 11:01:16 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:01:16 +0000
-Received: from pentafluge.infradead.org ([2001:4bd0:203e::1]) by
-	baythorne.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id
-	1HTFbx-0004lA-On for dwmw2 at baythorne.infradead.org; Mon, 19 Mar 2007
-	11:01:16 +0000
-Received: from ozlabs.org ([203.10.76.45]) by pentafluge.infradead.org with
-	esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1HTFbo-0004l8-8P for
-	dwmw2 at infradead.org; Mon, 19 Mar 2007 11:01:02 +0000
-Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix)
-	with ESMTP id 00DB5DE248 for <dwmw2 at infradead.org>; Mon, 19 Mar 2007
-	21:59:53 +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 651BEDDEEE for
-	<linuxppc-dev at ozlabs.org>; Mon, 19 Mar 2007 21:59:20 +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 1HTFUx-00034G-Ba; Mon, 19 Mar 2007 10:53:56
-	+0000
-Message-Id: <20070319105359.356866000 at sipsolutions.net>
-References: <20070319105352.771599000 at sipsolutions.net>
-User-Agent: quilt/0.45-1
-Date: Mon, 19 Mar 2007 11:53:55 +0100
-From: Johannes Berg <johannes at sipsolutions.net>
-To: linuxppc-dev at ozlabs.org
-Subject: [PATCH 3/5] powermac: disallow pmu sleep notifiers from aborting
-	sleep
-Content-Disposition: inline; filename=003-less-pmu-sleep-notifier.patch
-Mime-Version: 1.0
-X-Mailer: Evolution 2.8.2.1 
-X-BeenThere: linuxppc-dev at ozlabs.org
-X-Mailman-Version: 2.1.9
-Precedence: list
-List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>
-List-Unsubscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
-	<mailto:linuxppc-dev-request at ozlabs.org?subject=unsubscribe>
-List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev>
-List-Post: <mailto:linuxppc-dev at ozlabs.org>
-List-Help: <mailto:linuxppc-dev-request at ozlabs.org?subject=help>
-List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
-	<mailto:linuxppc-dev-request at ozlabs.org?subject=subscribe>
-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-Spam-Score: 0.0 (/)
-X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
-Content-Transfer-Encoding: 8bit
+Subject: [PATCH] powermac: disallow pmu sleep notifiers from aborting sleep
 
 Tracing through the code, no current PMU sleep notifier can abort sleep.
 Since no new PMU sleep notifiers should be added, this patch simplifies the
@@ -71,8 +19,8 @@
  sound/oss/dmasound/dmasound_awacs.c |    5 +---
  6 files changed, 24 insertions(+), 88 deletions(-)
 
---- linux-2.6.orig/drivers/macintosh/adb.c	2007-03-19 11:47:25.572413925 +0100
-+++ linux-2.6/drivers/macintosh/adb.c	2007-03-19 11:47:40.232413925 +0100
+--- wireless-dev.orig/drivers/macintosh/adb.c	2007-04-05 14:50:53.858552246 +0200
++++ wireless-dev/drivers/macintosh/adb.c	2007-04-05 17:55:25.478549941 +0200
 @@ -90,7 +90,7 @@ static int autopoll_devs;
  int __adb_probe_sync;
  
@@ -165,8 +113,8 @@
  	
  	return ret;
  }
---- linux-2.6.orig/drivers/macintosh/via-pmu.c	2007-03-19 11:47:25.642413925 +0100
-+++ linux-2.6/drivers/macintosh/via-pmu.c	2007-03-19 11:47:40.232413925 +0100
+--- wireless-dev.orig/drivers/macintosh/via-pmu.c	2007-04-05 14:50:53.938552246 +0200
++++ wireless-dev/drivers/macintosh/via-pmu.c	2007-04-05 18:14:00.208549941 +0200
 @@ -1769,35 +1769,21 @@ EXPORT_SYMBOL(pmu_unregister_sleep_notif
  #if defined(CONFIG_PM) && defined(CONFIG_PPC32)
  
@@ -243,8 +191,8 @@
  
  	/* Send suspend call to devices, hold the device core's dpm_sem */
  	ret = device_suspend(PMSG_SUSPEND);
---- linux-2.6.orig/include/linux/pmu.h	2007-03-19 11:47:25.902413925 +0100
-+++ linux-2.6/include/linux/pmu.h	2007-03-19 11:47:40.242413925 +0100
+--- wireless-dev.orig/include/linux/pmu.h	2007-04-05 14:50:54.048552246 +0200
++++ wireless-dev/include/linux/pmu.h	2007-04-05 17:55:25.488549941 +0200
 @@ -168,24 +168,16 @@ extern int pmu_get_model(void);
  
  struct pmu_sleep_notifier
@@ -272,8 +220,8 @@
  
  /* priority levels in notifiers */
  #define SLEEP_LEVEL_VIDEO	100	/* Video driver (first wake) */
---- linux-2.6.orig/drivers/macintosh/via-pmu-led.c	2007-03-19 11:47:25.702413925 +0100
-+++ linux-2.6/drivers/macintosh/via-pmu-led.c	2007-03-19 11:47:40.242413925 +0100
+--- wireless-dev.orig/drivers/macintosh/via-pmu-led.c	2007-04-05 14:50:53.948552246 +0200
++++ wireless-dev/drivers/macintosh/via-pmu-led.c	2007-04-05 17:55:25.488549941 +0200
 @@ -81,7 +81,7 @@ static struct led_classdev pmu_led = {
  };
  
@@ -292,8 +240,8 @@
  }
  
  static struct pmu_sleep_notifier via_pmu_led_sleep_notif = {
---- linux-2.6.orig/drivers/macintosh/apm_emu.c	2007-03-19 11:47:25.802413925 +0100
-+++ linux-2.6/drivers/macintosh/apm_emu.c	2007-03-19 11:47:40.242413925 +0100
+--- wireless-dev.orig/drivers/macintosh/apm_emu.c	2007-04-05 14:50:54.028552246 +0200
++++ wireless-dev/drivers/macintosh/apm_emu.c	2007-04-05 17:55:25.498549941 +0200
 @@ -96,7 +96,7 @@ static DECLARE_WAIT_QUEUE_HEAD(apm_waitq
  static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
  static struct apm_user *	user_list;
@@ -339,8 +287,8 @@
  }
  
  #define APM_CRITICAL		10
---- linux-2.6.orig/sound/oss/dmasound/dmasound_awacs.c	2007-03-19 11:47:26.032413925 +0100
-+++ linux-2.6/sound/oss/dmasound/dmasound_awacs.c	2007-03-19 11:47:40.252413925 +0100
+--- wireless-dev.orig/sound/oss/dmasound/dmasound_awacs.c	2007-04-05 14:50:54.138552246 +0200
++++ wireless-dev/sound/oss/dmasound/dmasound_awacs.c	2007-04-05 17:55:25.498549941 +0200
 @@ -257,7 +257,7 @@ static volatile struct dbdma_cmd *emerge
  /*
   * Stuff for restoring after a sleep.
@@ -367,10 +315,3 @@
  }
  #endif /* CONFIG_PM */
  
-
---
-
-_______________________________________________
-Linuxppc-dev mailing list
-Linuxppc-dev at ozlabs.org
-https://ozlabs.org/mailman/listinfo/linuxppc-dev

linux-2.6-powermac-generic-suspend-4.patch:
 Documentation/feature-removal-schedule.txt |   10 
 drivers/macintosh/via-pmu.c                |  319 ++++++++++++-----------------
 2 files changed, 149 insertions(+), 180 deletions(-)

Index: linux-2.6-powermac-generic-suspend-4.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-powermac-generic-suspend-4.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-powermac-generic-suspend-4.patch	25 Mar 2007 21:38:09 -0000	1.1
+++ linux-2.6-powermac-generic-suspend-4.patch	5 Apr 2007 18:37:18 -0000	1.2
@@ -1,56 +1,4 @@
-From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Tue Mar 20 00:13:31 2007
-Return-path: <linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org>
-Envelope-to: dwmw2 at baythorne.infradead.org
-Delivery-date: Tue, 20 Mar 2007 00:13:31 +0000
-Received: from pentafluge.infradead.org ([2001:4bd0:203e::1]) by
-	baythorne.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id
-	1HTRyl-00072X-Gz for dwmw2 at baythorne.infradead.org; Tue, 20 Mar 2007
-	00:13:31 +0000
-Received: from ozlabs.org ([203.10.76.45]) by pentafluge.infradead.org with
-	esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1HTRyi-0007Xq-1g for
-	dwmw2 at infradead.org; Tue, 20 Mar 2007 00:13:31 +0000
-Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix)
-	with ESMTP id 253E6DDFBB for <dwmw2 at infradead.org>; Tue, 20 Mar 2007
-	11:13:22 +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 DC781DDF3F for
-	<linuxppc-dev at ozlabs.org>; Tue, 20 Mar 2007 11:13:14 +1100 (EST)
-Received: from [84.135.241.123] (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 1HTRt3-0007M2-Hw; Tue, 20 Mar 2007 00:07:38
-	+0000
-Subject: [PATCH 4/5 v2] powermac: proper sleep management
-From: Johannes Berg <johannes at sipsolutions.net>
-To: linuxppc-dev at ozlabs.org
-In-Reply-To: <1174347848.5707.0.camel at johannes.berg>
-References: <20070319105352.771599000 at sipsolutions.net>
-	 <20070319105359.744830000 at sipsolutions.net>
-	 <1174347848.5707.0.camel at johannes.berg>
-Date: Tue, 20 Mar 2007 01:11:02 +0100
-Message-Id: <1174349462.3660.1.camel at johannes.berg>
-Mime-Version: 1.0
-X-Mailer: Evolution 2.8.2.1 
-X-BeenThere: linuxppc-dev at ozlabs.org
-X-Mailman-Version: 2.1.9
-Precedence: list
-List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>
-List-Unsubscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
-	<mailto:linuxppc-dev-request at ozlabs.org?subject=unsubscribe>
-List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev>
-List-Post: <mailto:linuxppc-dev at ozlabs.org>
-List-Help: <mailto:linuxppc-dev-request at ozlabs.org?subject=help>
-List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
-	<mailto:linuxppc-dev-request at ozlabs.org?subject=subscribe>
-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 and In-Reply-To but no 'Re:' in Subject.
-X-Spam-Score: 0.0 (/)
-X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
-Content-Transfer-Encoding: 8bit
+Subject: [PATCH] powermac: proper sleep management
 
 After having removed the power management ops from powermac completely, this
 patch adds them back for PMU based machines, directly in the PMU driver.
@@ -72,17 +20,15 @@
 because the generic layer actually freezes processes before STR.
 
 This updated version removes the sys_sync() call that can't be done with
-processes frozen. This version was updated again to not allow dual
-suspend (suspend to ram after writing things to disk) because that is
-not supported yet.
+processes frozen.
 
 ---
  Documentation/feature-removal-schedule.txt |   10 
- drivers/macintosh/via-pmu.c                |  306 +++++++++++------------------
- 2 files changed, 136 insertions(+), 180 deletions(-)
+ drivers/macintosh/via-pmu.c                |  319 ++++++++++++-----------------
+ 2 files changed, 149 insertions(+), 180 deletions(-)
 
---- linux-2.6.orig/drivers/macintosh/via-pmu.c	2007-03-19 19:15:06.553321419 +0100
-+++ linux-2.6/drivers/macintosh/via-pmu.c	2007-03-20 00:46:53.166994679 +0100
+--- wireless-dev.orig/drivers/macintosh/via-pmu.c	2007-04-05 17:55:25.488549941 +0200
++++ wireless-dev/drivers/macintosh/via-pmu.c	2007-04-05 18:02:27.368549941 +0200
 @@ -155,9 +155,6 @@ static int drop_interrupts;
  #if defined(CONFIG_PM) && defined(CONFIG_PPC32)
  static int option_lid_wakeup = 1;
@@ -316,7 +262,7 @@
  	pbook_free_pci_save();
  	iounmap(mem_ctrl);
  
-@@ -2558,6 +2403,123 @@ pmu_release(struct inode *inode, struct 
+@@ -2558,6 +2403,136 @@ pmu_release(struct inode *inode, struct 
  	return 0;
  }
  
@@ -327,6 +273,11 @@
 +	broadcast_sleep(PBOOK_SLEEP_REQUEST);
 +	broadcast_sleep(PBOOK_SLEEP_NOW);
 +
++	return 0;
++}
++
++static void powerbook_irq_off(suspend_state_t state)
++{
 +#ifdef CONFIG_PMAC_BACKLIGHT
 +	/* Tell backlight code not to muck around with the chip anymore */
 +	pmu_backlight_set_sleep(1);
@@ -338,19 +289,19 @@
 +
 +	preempt_disable();
 +
-+	return 0;
-+}
-+
-+static int powerbook_sleep(suspend_state_t state)
-+{
-+	int error = 0;
-+
 +	asm volatile("mtdec %0" : : "r" (0x7fffffff));
 +	/* Make sure any pending DEC interrupt occurring while we did
 +	 * the above didn't re-enable the DEC */
 +	mb();
 +	asm volatile("mtdec %0" : : "r" (0x7fffffff));
 +
++	local_irq_disable();
++}
++
++static int powerbook_sleep(suspend_state_t state)
++{
++	int error = 0;
++
 +	/* Wait for completion of async requests */
 +	while (!batt_req.complete)
 +		pmu_poll();
@@ -385,6 +336,16 @@
 +
 +	mdelay(100);
 +
++#ifdef CONFIG_PMAC_BACKLIGHT
++	/* Tell backlight code it can use the chip again */
++	pmu_backlight_set_sleep(0);
++#endif
++
++	return 0;
++}
++
++static void powerbook_irq_on(suspend_state_t state)
++{
 +	/* Force a poll of ADB interrupts */
 +	adb_int_pending = 1;
 +	via_pmu_interrupt(0, NULL);
@@ -392,22 +353,18 @@
 +	/* Restart jiffies & scheduling */
 +	wakeup_decrementer();
 +
-+	return 0;
-+}
-+
-+static int powerbook_finish_sleep(suspend_state_t state)
-+{
-+#ifdef CONFIG_PMAC_BACKLIGHT
-+	/* Tell backlight code it can use the chip again */
-+	pmu_backlight_set_sleep(0);
-+#endif
-+
++	/* Re-enable local CPU interrupts */
++	local_irq_enable();
++	mdelay(10);
 +	preempt_enable();
 +
 +	/* Call platform functions marked "on wake" */
 +	pmac_pfunc_base_resume();
 +	pmac_pfunc_i2c_resume();
++}
 +
++static int powerbook_finish_sleep(suspend_state_t state)
++{
 +	/* Notify old style drivers */
 +	broadcast_wake();
 +
@@ -422,8 +379,10 @@
 +
 +static struct pm_ops pmu_pm_ops = {
 +	.prepare = powerbook_prepare_sleep,
-+	.finish = powerbook_finish_sleep,
++	.irq_off = powerbook_irq_off,
 +	.enter = powerbook_sleep,
++	.irq_on = powerbook_irq_on,
++	.finish = powerbook_finish_sleep,
 +	.valid = pmu_sleep_valid,
 +};
 +
@@ -440,7 +399,7 @@
  static int
  pmu_ioctl(struct inode * inode, struct file *filp,
  		     u_int cmd, u_long arg)
-@@ -2567,29 +2529,19 @@ pmu_ioctl(struct inode * inode, struct f
+@@ -2567,29 +2542,19 @@ pmu_ioctl(struct inode * inode, struct f
  
  	switch (cmd) {
  #if defined(CONFIG_PM) && defined(CONFIG_PPC32)
@@ -478,7 +437,7 @@
  		if (pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) < 0)
  			return put_user(0, argp);
  		else
-@@ -2602,9 +2554,6 @@ pmu_ioctl(struct inode * inode, struct f
+@@ -2602,9 +2567,6 @@ pmu_ioctl(struct inode * inode, struct f
  	{
  		int brightness;
  
@@ -488,7 +447,7 @@
  		brightness = pmac_backlight_get_legacy_brightness();
  		if (brightness < 0)
  			return brightness;
-@@ -2616,9 +2565,6 @@ pmu_ioctl(struct inode * inode, struct f
+@@ -2616,9 +2578,6 @@ pmu_ioctl(struct inode * inode, struct f
  	{
  		int brightness;
  
@@ -498,9 +457,9 @@
  		error = get_user(brightness, argp);
  		if (error)
  			return error;
---- linux-2.6.orig/Documentation/feature-removal-schedule.txt	2007-03-19 19:15:00.773321419 +0100
-+++ linux-2.6/Documentation/feature-removal-schedule.txt	2007-03-19 19:15:07.323321419 +0100
-@@ -324,3 +324,13 @@ Why:	the i8xx_tco watchdog driver has be
+--- wireless-dev.orig/Documentation/feature-removal-schedule.txt	2007-04-05 14:50:53.608552246 +0200
++++ wireless-dev/Documentation/feature-removal-schedule.txt	2007-04-05 17:55:25.558549941 +0200
+@@ -312,3 +312,13 @@ Why:	the i8xx_tco watchdog driver has be
  Who:	Wim Van Sebroeck <wim at iguana.be>
  
  ---------------------------
@@ -514,9 +473,3 @@
 +Who:	Johannes Berg <johannes at sipsolutions.net>
 +
 +---------------------------
-
-
-_______________________________________________
-Linuxppc-dev mailing list
-Linuxppc-dev at ozlabs.org
-https://ozlabs.org/mailman/listinfo/linuxppc-dev




More information about the fedora-cvs-commits mailing list