r3666 - in trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian: . patches patches/series

Simon Horman horms at costa.debian.org
Tue Aug 2 05:40:33 UTC 2005


Author: horms
Date: 2005-08-02 05:40:32 +0000 (Tue, 02 Aug 2005)
New Revision: 3666

Added:
   trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/172_ppc32-time_offset-misuse.diff
Modified:
   trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/changelog
   trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-11
Log:
    [ppc32] stop misusing ntps time_offset value


Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/changelog
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/changelog	2005-08-02 04:31:44 UTC (rev 3665)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/changelog	2005-08-02 05:40:32 UTC (rev 3666)
@@ -21,15 +21,19 @@
   * Makefile-gcc-3.3.dpatch, control
     Build with gcc-3.3, as gcc-4.0, now the dedault in unstable,
     fails to build this source. Upstream has stated that they
-    have no intention making the 2.4 kernel compile with gcc-4 
+    have no intention making the 2.4 kernel compile with gcc-4
     (Simon Horman)
 
   * 171_arch-ia64-x86_64-execve-overflow.diff
     [Security, ia64, x86_64] Fix overflow in 32bit execve
     See CAN-2005-1768 (Simon Horman)
 
- -- Simon Horman <horms at debian.org>  Mon,  1 Aug 2005 15:38:17 +0900
+  * 172_ppc32-time_offset-misuse.diff
+    [ppc32] stop misusing ntps time_offset value
+    (Simon Horman)
 
+ -- Simon Horman <horms at debian.org>  Tue,  2 Aug 2005 15:46:19 +0900
+
 kernel-source-2.4.27 (2.4.27-10) unstable; urgency=low
 
   * 155_net-bluetooth-signdness-fix.diff:

Added: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/172_ppc32-time_offset-misuse.diff
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/172_ppc32-time_offset-misuse.diff	2005-08-02 04:31:44 UTC (rev 3665)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/172_ppc32-time_offset-misuse.diff	2005-08-02 05:40:32 UTC (rev 3666)
@@ -0,0 +1,78 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR at EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: ppc32: stop misusing ntps time_offset value
+## DP: Patch author: john stultz <johnstul at us.ibm.com>
+## DP: Upstream status: upstream
+
+. $(dirname $0)/DPATCH
+
+ at DPATCH@
+From: john stultz <johnstul at us.ibm.com>
+Date: Fri, 1 Jul 2005 05:08:54 +0000 (+1000)
+Subject: [PATCH] ppc32: stop misusing ntps time_offset value
+X-Git-Tag: v2.6.12.3
+X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/gregkh/linux-2.6.12.y.git;a=commitdiff;h=8f399a7448e0b58eae969426f61b7e81d55d2639
+
+  [PATCH] ppc32: stop misusing ntps time_offset value
+  
+  As part of my timeofday rework, I've been looking at the NTP code and I
+  noticed that the PPC architecture is apparently misusing the NTP's
+  time_offset (it is a terrible name!) value as some form of timezone offset.
+  
+  This could cause problems when time_offset changed by the NTP code.  This
+  patch changes the PPC code so it uses a more clear local variable:
+  timezone_offset.
+  
+  Signed-off-by: John Stultz <johnstul at us.ibm.com>
+  Acked-by: Tom Rini <trini at kernel.crashing.org>
+  Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
+  Signed-off-by: Andrew Morton <akpm at osdl.org>
+  Signed-off-by: Chris Wright <chrisw at osdl.org>
+  Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+---
+Backported to Debian's 2.6.8 by dann frazier <dannf at debian.org>
+Backported to Debian's 2.4.27 by Horms <horms at debian.org>
+
+--- a/arch/ppc/kernel/time.c	2003-08-25 20:44:40.000000000 +0900
++++ b/arch/ppc/kernel/time.c	2005-08-02 15:37:12.000000000 +0900
+@@ -84,7 +84,7 @@
+ 
+ extern unsigned long wall_jiffies;
+ 
+-static long time_offset;
++static long timezone_offset;
+ 
+ spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+ 
+@@ -187,7 +187,7 @@
+ 		     xtime.tv_sec - last_rtc_update >= 659 &&
+ 		     abs(xtime.tv_usec - (1000000-1000000/HZ)) < 500000/HZ &&
+ 		     jiffies - wall_jiffies == 1) {
+-		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
++		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0)
+ 				last_rtc_update = xtime.tv_sec+1;
+ 			else
+ 				/* Try again one minute later */
+@@ -297,7 +297,7 @@
+ 	unsigned old_stamp, stamp, elapsed;
+ 
+         if (ppc_md.time_init != NULL)
+-                time_offset = ppc_md.time_init();
++                timezone_offset = ppc_md.time_init();
+ 
+ 	if (__USE_RTC()) {
+ 		/* 601 processor: dec counts down by 128 every 128ns */
+@@ -344,9 +344,9 @@
+ 	/* If platform provided a timezone (pmac), we correct the time
+ 	 * using do_sys_settimeofday() which in turn calls warp_clock()
+ 	 */
+-        if (time_offset) {
++        if (timezone_offset) {
+         	struct timezone tz;
+-        	tz.tz_minuteswest = -time_offset / 60;
++        	tz.tz_minuteswest = -timezone_offset / 60;
+         	tz.tz_dsttime = 0;
+         	do_sys_settimeofday(NULL, &tz);
+         }

Modified: trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-11
===================================================================
--- trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-11	2005-08-02 04:31:44 UTC (rev 3665)
+++ trunk/kernel-2.4/source/kernel-source-2.4.27-2.4.27/debian/patches/series/2.4.27-11	2005-08-02 05:40:32 UTC (rev 3666)
@@ -4,3 +4,4 @@
 + 169_arch-x86_64-kernel-ptrace-canonical-rip-2.diff
 + 170_Makefile.gcc-3.3.diff
 + 171_arch-ia64-x86_64-execve-overflow.diff
++ 172_ppc32-time_offset-misuse.diff




More information about the Kernel-svn-changes mailing list