rpms/kernel/F-7 linux-2.6-acpi-sleep-fix-GPE-suspend-cleanup.patch, NONE, 1.1 linux-2.6-acpi-suspend-wrong-order-of-GPE-restore.patch, NONE, 1.1 linux-2.6-defaults-nommconf.patch, NONE, 1.1 linux-2.6-sched-keep-stime-monotonic.patch, NONE, 1.1 linux-2.6-sched-keep-utime-monotonic.patch, NONE, 1.1 kernel-2.6.spec, 1.3368, 1.3369 linux-2.6-acpi-gpe-list-fix-sleep.patch, 1.1, NONE linux-2.6-cputime-fix-accounting.patch, 1.1, NONE

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Wed Oct 31 00:39:19 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8791

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-acpi-sleep-fix-GPE-suspend-cleanup.patch 
	linux-2.6-acpi-suspend-wrong-order-of-GPE-restore.patch 
	linux-2.6-defaults-nommconf.patch 
	linux-2.6-sched-keep-stime-monotonic.patch 
	linux-2.6-sched-keep-utime-monotonic.patch 
Removed Files:
	linux-2.6-acpi-gpe-list-fix-sleep.patch 
	linux-2.6-cputime-fix-accounting.patch 
Log Message:
* Tue Oct 30 2007 Chuck Ebbert <cebbert at redhat.com>
- Use upstream fixes for monotonic stime/utime.
- Another ACPI suspend/resume fix.
- Disable PCI mmconfig by default (like Fedora 8.)


linux-2.6-acpi-sleep-fix-GPE-suspend-cleanup.patch:

--- NEW FILE linux-2.6-acpi-sleep-fix-GPE-suspend-cleanup.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c1c6a1ba786d58bd03e27ee49f89a5685e8e07b
Commit:     9c1c6a1ba786d58bd03e27ee49f89a5685e8e07b
Parent:     c9927c2bf4f45bb85e8b502ab3fb79ad6483c244
Author:     Alexey Starikovskiy <astarikovskiy at suse.de>
AuthorDate: Mon Oct 22 14:18:06 2007 +0400
Committer:  Len Brown <len.brown at intel.com>
CommitDate: Thu Oct 25 16:31:30 2007 -0400

    ACPI: sleep: Fix GPE suspend cleanup
    
    Commit 9b039330808b83acac3597535da26f47ad1862ce removed
    acpi_gpe_sleep_prepare(), the only function used at S5 transition
    Add call to generic acpi_enable_wake_device().
    
    Reference: https://bugzilla.novell.com/show_bug.cgi?id=299882
    
    Signed-off-by: Alexey Starikovskiy <astarikovskiy at suse.de>
    Acked-by: Rafael J. Wysocki <rjw at sisk.pl>
    Signed-off-by: Len Brown <len.brown at intel.com>
---
 drivers/acpi/sleep/main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index f3d3867..2f9d3c1 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -410,6 +410,7 @@ static void acpi_power_off(void)
 	/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
 	printk("%s called\n", __FUNCTION__);
 	local_irq_disable();
+	acpi_enable_wakeup_device(ACPI_STATE_S5);
 	acpi_enter_sleep_state(ACPI_STATE_S5);
 }
 

linux-2.6-acpi-suspend-wrong-order-of-GPE-restore.patch:

--- NEW FILE linux-2.6-acpi-suspend-wrong-order-of-GPE-restore.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1dbc1fda5d8ca907f320b806005d4a447977d26a
Commit:     1dbc1fda5d8ca907f320b806005d4a447977d26a
Parent:     9c1c6a1ba786d58bd03e27ee49f89a5685e8e07b
Author:     Alexey Starikovskiy <astarikovskiy at suse.de>
AuthorDate: Mon Oct 22 14:18:12 2007 +0400
Committer:  Len Brown <len.brown at intel.com>
CommitDate: Thu Oct 25 16:31:30 2007 -0400

    ACPI: suspend: Wrong order of GPE restore.
    
    acpi_leave_sleep_state() should have correct list of wake and
    runtime GPEs, which is available only after disable_wakeup_device()
    is called.
    
    Signed-off-by: Alexey Starikovskiy <astarikovskiy at suse.de>
    Acked-by: Rafael J. Wysocki <rjw at sisk.pl>
    Signed-off-by: Len Brown <len.brown at intel.com>
---
 drivers/acpi/sleep/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 2f9d3c1..2c0b663 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -167,8 +167,8 @@ static void acpi_pm_finish(void)
 {
 	u32 acpi_state = acpi_target_sleep_state;
 
-	acpi_leave_sleep_state(acpi_state);
 	acpi_disable_wakeup_device(acpi_state);
+	acpi_leave_sleep_state(acpi_state);
 
 	/* reset firmware waking vector */
 	acpi_set_firmware_waking_vector((acpi_physical_address) 0);
@@ -272,8 +272,8 @@ static void acpi_hibernation_finish(void)
 
 static void acpi_hibernation_finish(void)
 {
-	acpi_leave_sleep_state(ACPI_STATE_S4);
 	acpi_disable_wakeup_device(ACPI_STATE_S4);
+	acpi_leave_sleep_state(ACPI_STATE_S4);
 
 	/* reset firmware waking vector */
 	acpi_set_firmware_waking_vector((acpi_physical_address) 0);

linux-2.6-defaults-nommconf.patch:

--- NEW FILE linux-2.6-defaults-nommconf.patch ---
--- linux-2.6.23.noarch/Documentation/kernel-parameters.txt~	2007-10-30 03:53:31.000000000 -0400
+++ linux-2.6.23.noarch/Documentation/kernel-parameters.txt	2007-10-30 03:54:02.000000000 -0400
@@ -1273,6 +1273,8 @@ and is between 256 and 4096 characters. 
 				Mechanism 1.
 		conf2		[X86-32] Force use of PCI Configuration
 				Mechanism 2.
+		mmconf		[IA-32,X86_64] Enable use of MMCONFIG for PCI
+				Configuration
 		nommconf	[X86-32,X86_64] Disable use of MMCONFIG for PCI
 				Configuration
 		nomsi		[MSI] If the PCI_MSI kernel config parameter is
--- vanilla/arch/i386/Kconfig	2007-10-09 16:31:38.000000000 -0400
+++ linux-2.6.23.noarch/arch/i386/Kconfig	2007-10-30 12:18:06.000000000 -0400
@@ -1137,6 +1139,16 @@ config PCI_MMCONFIG
 	depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
 	default y
 
+config PCI_MMCONFIG_OFF_BY_DEFAULT
+	bool "Disable PCI MMCONFIG by default"
+	depends on PCI_MMCONFIG
+	help
+	   A lot of machines have broken BIOS tables which means that kernels
+	   built with PCI_MMCONFIG enabled fail to boot.  As a compromise, enabling
+	   this option allows the ability to build a kernel capable of using
+	   mmconf PCI accesses if booted with pci=mmconf
+	   Distribution kernels will likely need this option.
+
 source "drivers/pci/pcie/Kconfig"
 
 source "drivers/pci/Kconfig"
--- vanilla/arch/x86_64/Kconfig	2007-10-09 16:31:38.000000000 -0400
+++ linux-2.6.23.noarch/arch/x86_64/Kconfig	2007-10-30 12:18:19.000000000 -0400
@@ -724,6 +744,16 @@ config PCI_MMCONFIG
 	bool "Support mmconfig PCI config space access"
 	depends on PCI && ACPI
 
+config PCI_MMCONFIG_OFF_BY_DEFAULT
+	bool "Disable PCI MMCONFIG by default"
+	depends on PCI_MMCONFIG
+	help
+	  A lot of machines have broken BIOS tables which means that kernels
+	  built with PCI_MMCONFIG enabled fail to boot.  As a compromise, enabling
+	  this option allows the ability to build a kernel capable of using
+	  mmconf PCI accesses if booted with pci=mmconf
+	  Distribution kernels will likely need this option.
+
 source "drivers/pci/pcie/Kconfig"
 
 source "drivers/pci/Kconfig"
--- linux-2.6.23.noarch/arch/i386/pci/common.c~	2007-10-30 12:35:05.000000000 -0400
+++ linux-2.6.23.noarch/arch/i386/pci/common.c	2007-10-30 12:35:52.000000000 -0400
@@ -18,7 +18,7 @@
 #include "pci.h"
 
 unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
-				PCI_PROBE_MMCONF;
+				PCI_PROBE_MMCONF_DEFAULT;
 
 static int pci_bf_sort;
 int pci_routeirq;
@@ -399,6 +399,10 @@ char * __devinit  pcibios_setup(char *st
 		pci_probe &= ~PCI_PROBE_MMCONF;
 		return NULL;
 	}
+	else if (!strcmp(str, "mmconf")) {
+		pci_probe |= PCI_PROBE_MMCONF;
+		return NULL;
+	}
 #endif
 	else if (!strcmp(str, "noacpi")) {
 		acpi_noirq_set();
--- linux-2.6.23.noarch/arch/i386/pci/pci.h~	2007-10-30 12:36:06.000000000 -0400
+++ linux-2.6.23.noarch/arch/i386/pci/pci.h	2007-10-30 12:36:32.000000000 -0400
@@ -19,6 +19,12 @@
 #define PCI_PROBE_MASK		0x000f
 #define PCI_PROBE_NOEARLY	0x0010
 
+#ifdef CONFIG_PCI_MMCONFIG_OFF_BY_DEFAULT
+# define PCI_PROBE_MMCONF_DEFAULT	0
+#else
+# define PCI_PROBE_MMCONF_DEFAULT	PCI_PROBE_MMCONF
+#endif
+
 #define PCI_NO_SORT		0x0100
 #define PCI_BIOS_SORT		0x0200
 #define PCI_NO_CHECKS		0x0400

linux-2.6-sched-keep-stime-monotonic.patch:

--- NEW FILE linux-2.6-sched-keep-stime-monotonic.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9301899be75b464ef097f0b5af7af6d9bd8f68a7
Commit:     9301899be75b464ef097f0b5af7af6d9bd8f68a7
Parent:     82798a17ad40df827d465329a20ace80497f9b32
Author:     Balbir Singh <balbir at linux.vnet.ibm.com>
AuthorDate: Tue Oct 30 00:26:32 2007 +0100
Committer:  Ingo Molnar <mingo at elte.hu>
CommitDate: Tue Oct 30 00:26:32 2007 +0100

    sched: fix /proc/<PID>/stat stime/utime monotonicity, part 2
    
    Extend Peter's patch to fix accounting issues, by keeping stime
    monotonic too.
    
    Signed-off-by: Balbir Singh <balbir at linux.vnet.ibm.com>
    Signed-off-by: Ingo Molnar <mingo at elte.hu>
    Tested-by: Frans Pop <elendil at planet.nl>
---
 fs/proc/array.c       |    3 ++-
 include/linux/sched.h |    2 +-
 kernel/fork.c         |    1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/proc/array.c b/fs/proc/array.c
index d80baaa..eba339e 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -374,7 +374,8 @@ static cputime_t task_stime(struct task_struct *p)
 	stime = nsec_to_clock_t(p->se.sum_exec_runtime) -
 			cputime_to_clock_t(task_utime(p));
 
-	return clock_t_to_cputime(stime);
+	p->prev_stime = max(p->prev_stime, clock_t_to_cputime(stime));
+	return p->prev_stime;
 }
 #endif
 
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b0b1fe6..155d743 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1009,7 +1009,7 @@ struct task_struct {
 
 	unsigned int rt_priority;
 	cputime_t utime, stime;
-	cputime_t prev_utime;
+	cputime_t prev_utime, prev_stime;
 	unsigned long nvcsw, nivcsw; /* context switch counts */
 	struct timespec start_time; 		/* monotonic time */
 	struct timespec real_start_time;	/* boot based time */
diff --git a/kernel/fork.c b/kernel/fork.c
index a65bfc4..28a7401 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1057,6 +1057,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 	p->utime = cputime_zero;
 	p->stime = cputime_zero;
 	p->prev_utime = cputime_zero;
+	p->prev_stime = cputime_zero;
 
 #ifdef CONFIG_TASK_XACCT
 	p->rchar = 0;		/* I/O counter: bytes read */

linux-2.6-sched-keep-utime-monotonic.patch:

--- NEW FILE linux-2.6-sched-keep-utime-monotonic.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=73a2bcb0edb9ffb0b007b3546b430e2c6e415eee
Commit:     73a2bcb0edb9ffb0b007b3546b430e2c6e415eee
Parent:     f7402e0361d4472535e07cfca648f2fa81d85cd2
Author:     Peter Zijlstra <a.p.zijlstra at chello.nl>
AuthorDate: Mon Oct 29 21:18:11 2007 +0100
Committer:  Ingo Molnar <mingo at elte.hu>
CommitDate: Mon Oct 29 21:18:11 2007 +0100

    sched: keep utime/stime monotonic
    
    keep utime/stime monotonic.
    
    cpustats use utime/stime as a ratio against sum_exec_runtime, as a
    consequence it can happen - when the ratio changes faster than time
    accumulates - that either can be appear to go backwards.
    
    Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
    Signed-off-by: Ingo Molnar <mingo at elte.hu>
---
 fs/proc/array.c       |    3 ++-
 include/linux/sched.h |    1 +
 kernel/fork.c         |    1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/proc/array.c b/fs/proc/array.c
index 63c95af..d80baaa 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -358,7 +358,8 @@ static cputime_t task_utime(struct task_struct *p)
 	}
 	utime = (clock_t)temp;
 
-	return clock_t_to_cputime(utime);
+	p->prev_utime = max(p->prev_utime, clock_t_to_cputime(utime));
+	return p->prev_utime;
 }
 
 static cputime_t task_stime(struct task_struct *p)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3c07d59..b0b1fe6 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1009,6 +1009,7 @@ struct task_struct {
 
 	unsigned int rt_priority;
 	cputime_t utime, stime;
+	cputime_t prev_utime;
 	unsigned long nvcsw, nivcsw; /* context switch counts */
 	struct timespec start_time; 		/* monotonic time */
 	struct timespec real_start_time;	/* boot based time */
diff --git a/kernel/fork.c b/kernel/fork.c
index ddafdfa..a65bfc4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1056,6 +1056,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 
 	p->utime = cputime_zero;
 	p->stime = cputime_zero;
+	p->prev_utime = cputime_zero;
 
 #ifdef CONFIG_TASK_XACCT
 	p->rchar = 0;		/* I/O counter: bytes read */


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3368
retrieving revision 1.3369
diff -u -r1.3368 -r1.3369
--- kernel-2.6.spec	30 Oct 2007 14:24:41 -0000	1.3368
+++ kernel-2.6.spec	31 Oct 2007 00:38:45 -0000	1.3369
@@ -582,6 +582,7 @@
 Patch610: linux-2.6-defaults-fat-utf8.patch
 Patch620: linux-2.6-defaults-unicode-vt.patch
 Patch630: linux-2.6-defaults-nonmi.patch
+Patch635: linux-2.6-defaults-nommconf.patch
 
 Patch660: linux-2.6-libata-ali-atapi-dma.patch
 Patch662: linux-2.6-ata-quirk.patch
@@ -614,7 +615,8 @@
 Patch750: linux-2.6-firewire-multi-lun.patch
 Patch751: linux-2.6-firewire-lockdep.patch
 
-Patch770: linux-2.6-acpi-gpe-list-fix-sleep.patch
+Patch770: linux-2.6-acpi-sleep-fix-GPE-suspend-cleanup.patch
+Patch771: linux-2.6-acpi-suspend-wrong-order-of-GPE-restore.patch
 
 Patch780: linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
 Patch781: linux-2.6-usb-suspend-classes.patch
@@ -634,7 +636,8 @@
 Patch1320: linux-2.6-ps3-storage-alias.patch
 
 Patch1500: linux-2.6-pmtrace-time-fix.patch
-Patch1510: linux-2.6-cputime-fix-accounting.patch
+Patch1510: linux-2.6-sched-keep-stime-monotonic.patch
+Patch1511: linux-2.6-sched-keep-utime-monotonic.patch
 
 Patch1600: linux-2.6-params-sysfs-skip-missing-period.patch
 
@@ -1243,6 +1246,8 @@
 ApplyPatch linux-2.6-defaults-unicode-vt.patch
 # Disable NMI watchdog by default.
 ApplyPatch linux-2.6-defaults-nonmi.patch
+# disable mmconf
+ApplyPatch linux-2.6-defaults-nommconf.patch
 
 # Disable ATAPI DMA on ALI chipsets.
 ApplyPatch linux-2.6-libata-ali-atapi-dma.patch
@@ -1303,7 +1308,9 @@
 ApplyPatch linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
 
 # ACPI patches
-ApplyPatch linux-2.6-acpi-gpe-list-fix-sleep.patch
+# suspend/resume fixes
+ApplyPatch linux-2.6-acpi-sleep-fix-GPE-suspend-cleanup.patch
+ApplyPatch linux-2.6-acpi-suspend-wrong-order-of-GPE-restore.patch
 
 # Fix excessive wakeups
 # Make hdaps timer only tick when in use.
@@ -1324,7 +1331,8 @@
 ApplyPatch linux-2.6-pmtrace-time-fix.patch
 
 # fix "top shows 9999% CPU usage"
-ApplyPatch linux-2.6-cputime-fix-accounting.patch
+ApplyPatch linux-2.6-sched-keep-utime-monotonic.patch
+ApplyPatch linux-2.6-sched-keep-stime-monotonic.patch
 
 # fix weird file in /sys/module/nousb
 ApplyPatch linux-2.6-params-sysfs-skip-missing-period.patch
@@ -2252,6 +2260,11 @@
 
 %changelog
 * Tue Oct 30 2007 Chuck Ebbert <cebbert at redhat.com>
+- Use upstream fixes for monotonic stime/utime.
+- Another ACPI suspend/resume fix.
+- Disable PCI mmconfig by default (like Fedora 8.)
+
+* Tue Oct 30 2007 Chuck Ebbert <cebbert at redhat.com>
 - CIFS: fix reconnect when incomplete packet is received
 
 * Mon Oct 29 2007 Chuck Ebbert <cebbert at redhat.com>


--- linux-2.6-acpi-gpe-list-fix-sleep.patch DELETED ---


--- linux-2.6-cputime-fix-accounting.patch DELETED ---




More information about the fedora-extras-commits mailing list