rpms/kernel/devel linux-2.6-x86-AMD-c1e-disable-apic-timer.patch, NONE, 1.1 patch-2.6.23-rc8-git2.bz2.sign, NONE, 1.1 .cvsignore, 1.696, 1.697 kernel.spec, 1.193, 1.194 linux-2.6-highres-timers.patch, 1.14, 1.15 sources, 1.657, 1.658 upstream, 1.579, 1.580 linux-2.6-x86-edd-maxdrive.patch, 1.1, NONE linux-2.6-x86-setup-handle-improperly-terminated-E820.patch, 1.1, NONE patch-2.6.23-rc8-git1.bz2.sign, 1.1, NONE

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Thu Sep 27 16:33:52 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22979

Modified Files:
	.cvsignore kernel.spec linux-2.6-highres-timers.patch sources 
	upstream 
Added Files:
	linux-2.6-x86-AMD-c1e-disable-apic-timer.patch 
	patch-2.6.23-rc8-git2.bz2.sign 
Removed Files:
	linux-2.6-x86-edd-maxdrive.patch 
	linux-2.6-x86-setup-handle-improperly-terminated-E820.patch 
	patch-2.6.23-rc8-git1.bz2.sign 
Log Message:
* Thu Sep 27 2007 Chuck Ebbert <cebbert at redhat.com>
- Linux 2.6.23-rc8-git2
- Re-add AMD timer fix removed from upstream
- Fix hotplug CPU (broken by AMD timer patch)


linux-2.6-x86-AMD-c1e-disable-apic-timer.patch:

--- NEW FILE linux-2.6-x86-AMD-c1e-disable-apic-timer.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e66485d747505e9d960b864fc6c37f8b2afafaf0
Commit:     e66485d747505e9d960b864fc6c37f8b2afafaf0
Parent:     3dffec45c2742961dd27f55aba426cb9cf3f0dcd
Author:     Thomas Gleixner <tglx at linutronix.de>
AuthorDate: Tue Sep 25 21:37:01 2007 +0200
Committer:  Linus Torvalds <torvalds at woody.linux-foundation.org>
CommitDate: Wed Sep 26 09:22:04 2007 -0700

    x86-64: Disable local APIC timer use on AMD systems with C1E
    
    commit 3556ddfa9284a86a59a9b78fe5894430f6ab4eef titled
    
     [PATCH] x86-64: Disable local APIC timer use on AMD systems with C1E
    
    solves a problem with AMD dual core laptops e.g. HP nx6325 (Turion 64
    X2) with C1E enabled:
    
    When both cores go into idle at the same time, then the system switches
    into C1E state, which is basically the same as C3. This stops the local
    apic timer.
    
    This was debugged right after the dyntick merge on i386 and despite the
    patch title it fixes only the 32 bit path.
    
    x86_64 is still missing this fix. It seems that mainline is not really
    affected by this issue, as the PIT is running and keeps jiffies
    incrementing, but that's just waiting for trouble.
    
    -mm suffers from this problem due to the x86_64 high resolution timer
    patches.
    
    This is a quick and dirty port of the i386 code to x86_64.
    
    I spent quite a time with Rafael to debug the -mm / hrt wreckage until
    someone pointed us to this. I really had forgotten that we debugged this
    half a year ago already.
    
    Sigh, is it just me or is there something yelling arch/x86 into my ear?
    
    Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
    Tested-by: Rafael J. Wysocki <rjw at sisk.pl>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 arch/x86_64/kernel/setup.c |   34 ++++++++++++++++++++++++++++++++++
 include/asm-x86_64/apic.h  |    1 +
 2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index af838f6..32054bf 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -546,6 +546,37 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c)
 #endif
 }
 
+#define ENABLE_C1E_MASK		0x18000000
+#define CPUID_PROCESSOR_SIGNATURE	1
+#define CPUID_XFAM		0x0ff00000
+#define CPUID_XFAM_K8		0x00000000
+#define CPUID_XFAM_10H		0x00100000
+#define CPUID_XFAM_11H		0x00200000
+#define CPUID_XMOD		0x000f0000
+#define CPUID_XMOD_REV_F	0x00040000
+
+/* AMD systems with C1E don't have a working lAPIC timer. Check for that. */
+static __cpuinit int amd_apic_timer_broken(void)
+{
+	u32 lo, hi;
+	u32 eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
+	switch (eax & CPUID_XFAM) {
+	case CPUID_XFAM_K8:
+		if ((eax & CPUID_XMOD) < CPUID_XMOD_REV_F)
+			break;
+	case CPUID_XFAM_10H:
+	case CPUID_XFAM_11H:
+		rdmsr(MSR_K8_ENABLE_C1E, lo, hi);
+		if (lo & ENABLE_C1E_MASK)
+			return 1;
+		break;
+	default:
+		/* err on the side of caution */
+		return 1;
+	}
+	return 0;
+}
+
 static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 {
 	unsigned level;
@@ -617,6 +648,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 	/* Family 10 doesn't support C states in MWAIT so don't use it */
 	if (c->x86 == 0x10 && !force_mwait)
 		clear_bit(X86_FEATURE_MWAIT, &c->x86_capability);
+
+	if (amd_apic_timer_broken())
+		disable_apic_timer = 1;
 }
 
 static void __cpuinit detect_ht(struct cpuinfo_x86 *c)
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h
index 85125ef..e458020 100644
--- a/include/asm-x86_64/apic.h
+++ b/include/asm-x86_64/apic.h
@@ -20,6 +20,7 @@ extern int apic_verbosity;
 extern int apic_runs_main_timer;
 extern int ioapic_force;
 extern int apic_mapped;
+extern int disable_apic_timer;
 
 /*
  * Define the default level of output to be very little
===================================================================
From: Rafael J. Wysocki <rjw at sisk.pl>

Fix CPU hotplug breakage on HP nx6325 and similar boxes caused by a reference
to disable_apic_timer (labeled as __initdata) from the CPU initialization code.

Signed-off-by: Rafael J. Wysocki <rjw at sisk.pl>
---
 arch/x86_64/kernel/apic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.23-rc8-mm2.orig/arch/x86_64/kernel/apic.c
+++ linux-2.6.23-rc8-mm2/arch/x86_64/kernel/apic.c
@@ -42,7 +42,7 @@
 int apic_runs_main_timer;
 int apic_calibrate_pmtmr __initdata;
 
-int disable_apic_timer __initdata;
+int disable_apic_timer __cpuinitdata;
 
 /* Local APIC timer works in C2? */
 int local_apic_timer_c2_ok;


--- NEW FILE patch-2.6.23-rc8-git2.bz2.sign ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info

iD8DBQBG+1WoyGugalF9Dw4RAvvgAJ9rlXz2/rgvz6IRmKqhvnDRkuvx9gCff4pV
2skby1eGQ/b049BH6kUq/iA=
=ByeV
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/.cvsignore,v
retrieving revision 1.696
retrieving revision 1.697
diff -u -r1.696 -r1.697
--- .cvsignore	26 Sep 2007 21:03:40 -0000	1.696
+++ .cvsignore	27 Sep 2007 16:33:17 -0000	1.697
@@ -4,4 +4,4 @@
 kernel-2.6.22
 linux-2.6.22.tar.bz2
 patch-2.6.23-rc8.bz2
-patch-2.6.23-rc8-git1.bz2
+patch-2.6.23-rc8-git2.bz2


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -r1.193 -r1.194
--- kernel.spec	27 Sep 2007 14:37:05 -0000	1.193
+++ kernel.spec	27 Sep 2007 16:33:17 -0000	1.194
@@ -47,7 +47,7 @@
 # The rc snapshot level
 %define rcrev 8
 # The git snapshot level
-%define gitrev 1
+%define gitrev 2
 # Set rpm version accordingly
 %define rpmversion 2.6.%{upstream_sublevel}
 %endif
@@ -555,6 +555,7 @@
 
 %if !%{nopatches}
 
+Patch18: linux-2.6-x86-AMD-c1e-disable-apic-timer.patch
 Patch19: linux-2.6-highres-timers.patch
 
 Patch21: linux-2.6-utrace-tracehook.patch
@@ -674,9 +675,6 @@
 Patch1512: linux-2.6-firewire-multi-lun.patch
 Patch1515: linux-2.6-lirc.patch
 
-Patch1600: linux-2.6-x86-edd-maxdrive.patch
-Patch1610: linux-2.6-x86-setup-handle-improperly-terminated-E820.patch
-
 #nouveau
 Patch1800: drm-mm-git.patch
 Patch1801: nouveau-drm.patch
@@ -968,6 +966,8 @@
 
 %if !%{nopatches}
 
+# fix timer with AMD chips supporting C1e
+ApplyPatch linux-2.6-x86-AMD-c1e-disable-apic-timer.patch
 # patch-2.6.23-rc3-hrt2.patch
 ApplyPatch linux-2.6-highres-timers.patch
 
@@ -1218,12 +1218,6 @@
 
 # ---------- below all scheduled for 2.6.23 -----------------
 
-# EDD fix
-ApplyPatch linux-2.6-x86-edd-maxdrive.patch
-
-# e820 bugfix
-ApplyPatch linux-2.6-x86-setup-handle-improperly-terminated-E820.patch
-
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -1815,6 +1809,11 @@
 
 
 %changelog
+* Thu Sep 27 2007 Chuck Ebbert <cebbert at redhat.com>
+- Linux 2.6.23-rc8-git2
+- Re-add AMD timer fix removed from upstream
+- Fix hotplug CPU (broken by AMD timer patch)
+
 * Thu Sep 27 2007 John W. Linville <linville at redhat.com>
 - Fix-up botched wireless patch restructuring...
 

linux-2.6-highres-timers.patch:

Index: linux-2.6-highres-timers.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-highres-timers.patch,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- linux-2.6-highres-timers.patch	26 Sep 2007 21:26:15 -0000	1.14
+++ linux-2.6-highres-timers.patch	27 Sep 2007 16:33:17 -0000	1.15
@@ -5306,10 +5306,10 @@
 -int apic_runs_main_timer;
 -int apic_calibrate_pmtmr __initdata;
 -
--int disable_apic_timer __initdata;
+-int disable_apic_timer __cpuinitdata;
 +static int apic_mapped;
 +static int apic_calibrate_pmtmr __initdata;
-+int disable_apic_timer __initdata;
++int disable_apic_timer __cpuinitdata;
  
  /* Local APIC timer works in C2? */
  int local_apic_timer_c2_ok;


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/sources,v
retrieving revision 1.657
retrieving revision 1.658
diff -u -r1.657 -r1.658
--- sources	26 Sep 2007 21:03:40 -0000	1.657
+++ sources	27 Sep 2007 16:33:17 -0000	1.658
@@ -1,3 +1,3 @@
 2e230d005c002fb3d38a3ca07c0200d0  linux-2.6.22.tar.bz2
 114ebb5499bbaa352c8ed51faa0a1ba1  patch-2.6.23-rc8.bz2
-22a7616e220e358cee563d6626fe50df  patch-2.6.23-rc8-git1.bz2
+30b939f6baea2e0d842a323cc7bdcbfe  patch-2.6.23-rc8-git2.bz2


Index: upstream
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/upstream,v
retrieving revision 1.579
retrieving revision 1.580
diff -u -r1.579 -r1.580
--- upstream	26 Sep 2007 21:03:40 -0000	1.579
+++ upstream	27 Sep 2007 16:33:17 -0000	1.580
@@ -1,3 +1,3 @@
 linux-2.6.22.tar.bz2
 patch-2.6.23-rc8.bz2
-patch-2.6.23-rc8-git1.bz2
+patch-2.6.23-rc8-git2.bz2


--- linux-2.6-x86-edd-maxdrive.patch DELETED ---


--- linux-2.6-x86-setup-handle-improperly-terminated-E820.patch DELETED ---


--- patch-2.6.23-rc8-git1.bz2.sign DELETED ---




More information about the fedora-extras-commits mailing list