[kernel] r5556 - in dists/sid/linux-2.6/debian: . patches
patches/series
Jurij Smakov
jurij-guest at costa.debian.org
Sun Jan 22 00:25:36 UTC 2006
Author: jurij-guest
Date: Sun Jan 22 00:25:35 2006
New Revision: 5556
Added:
dists/sid/linux-2.6/debian/patches/sparc64-jumping-time.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/4
Log:
Add a fix for the race condition in kernel/time.c
which occasionally caused time to jump forward and
hang the machine.
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog (original)
+++ dists/sid/linux-2.6/debian/changelog Sun Jan 22 00:25:35 2006
@@ -1,11 +1,17 @@
linux-2.6 (2.6.15-4) UNRELEASED; urgency=low
[ Jurij Smakov ]
* [sparc64] Add the sparc64-entry-strace.patch to fix the
- strace on sparc (it has been broken since 2.6.15). The
+ strace on sparc (it has been broken since 2.6.13). The
patch have not been blessed by upstream yet, but it works
for other people and I've tested it myself. (Closes: #339562)
+ Thanks to Richard Mortimer for coming up with this fix.
Ref: http://marc.theaimsgroup.com/?t=113676826400001&r=1&w=2
-
+ * [sparc64] Add sparc64-jumping-time.patch to fix the race
+ condition in kernel/time.c, which occasionally resulted in
+ time jumping forward with a subsequent hang. Thanks to Richard
+ Mortimer, acked by David Miller and applied upstream.
+ Ref: http://marc.theaimsgroup.com/?t=113745273000001&r=1&w=2
+
-- Jurij Smakov <jurij at wooyd.org> Sat, 21 Jan 2006 16:14:33 -0800
linux-2.6 (2.6.15-3) unstable; urgency=low
Modified: dists/sid/linux-2.6/debian/patches/series/4
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/4 (original)
+++ dists/sid/linux-2.6/debian/patches/series/4 Sun Jan 22 00:25:35 2006
@@ -1,2 +1,3 @@
+ m68k-vmeints.patch
+ sparc64-entry-strace.patch
++ sparc64-jumping-time.patch
Added: dists/sid/linux-2.6/debian/patches/sparc64-jumping-time.patch
==============================================================================
--- (empty file)
+++ dists/sid/linux-2.6/debian/patches/sparc64-jumping-time.patch Sun Jan 22 00:25:35 2006
@@ -0,0 +1,44 @@
+diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
+index 459c8fb..a22930d 100644
+--- a/arch/sparc64/kernel/time.c
++++ b/arch/sparc64/kernel/time.c
+@@ -280,9 +280,9 @@ static struct sparc64_tick_ops stick_ope
+ * Since STICK is constantly updating, we have to access it carefully.
+ *
+ * The sequence we use to read is:
+- * 1) read low
+- * 2) read high
+- * 3) read low again, if it rolled over increment high by 1
++ * 1) read high
++ * 2) read low
++ * 3) read high again, if it rolled re-read both low and high again.
+ *
+ * Writing STICK safely is also tricky:
+ * 1) write low to zero
+@@ -295,18 +295,18 @@ static struct sparc64_tick_ops stick_ope
+ static unsigned long __hbird_read_stick(void)
+ {
+ unsigned long ret, tmp1, tmp2, tmp3;
+- unsigned long addr = HBIRD_STICK_ADDR;
++ unsigned long addr = HBIRD_STICK_ADDR+8;
+
+- __asm__ __volatile__("ldxa [%1] %5, %2\n\t"
+- "add %1, 0x8, %1\n\t"
+- "ldxa [%1] %5, %3\n\t"
++ __asm__ __volatile__("ldxa [%1] %5, %2\n"
++ "1:\n\t"
+ "sub %1, 0x8, %1\n\t"
++ "ldxa [%1] %5, %3\n\t"
++ "add %1, 0x8, %1\n\t"
+ "ldxa [%1] %5, %4\n\t"
+ "cmp %4, %2\n\t"
+- "blu,a,pn %%xcc, 1f\n\t"
+- " add %3, 1, %3\n"
+- "1:\n\t"
+- "sllx %3, 32, %3\n\t"
++ "bne,a,pn %%xcc, 1b\n\t"
++ " mov %4, %2\n\t"
++ "sllx %4, 32, %4\n\t"
+ "or %3, %4, %0\n\t"
+ : "=&r" (ret), "=&r" (addr),
+ "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3)
More information about the Kernel-svn-changes
mailing list