WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix e1000 hang during reboot bug. Kudos to Steven Hand f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix e1000 hang during reboot bug. Kudos to Steven Hand for analyzing.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Sat, 21 May 2005 12:40:10 +0000
Delivery-date: Sun, 22 May 2005 17:05:22 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1885, 2005/05/21 13:40:10+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        Fix e1000 hang during reboot bug.  Kudos to Steven Hand for analyzing.
        time.c:
          Fix bug in code which sets our one-shot timer when we decide to block 
during
          the idle loop.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 time.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c       2005-05-22 
13:06:05 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c       2005-05-22 
13:06:05 -04:00
@@ -656,7 +656,12 @@
 /* Convert jiffies to system time. Call with xtime_lock held for reading. */
 static inline u64 __jiffies_to_st(unsigned long j) 
 {
-       return processed_system_time + ((j - jiffies) * NS_PER_TICK);
+       long delta = j - jiffies;
+       /* NB. The next check can trigger in some wrap-around cases, but
+        * that's ok -- we'll just end up with a shorter timeout. */
+       if (delta < 1)
+               delta = 1;
+       return processed_system_time + (delta * NS_PER_TICK);
 }
 
 /*
@@ -683,8 +688,6 @@
         * updates of jiffies since interrupts are off.
         */
        j = next_timer_interrupt();
-       if (j < (jiffies + 1))
-               j = jiffies + 1;
        alarm = __jiffies_to_st(j);
 
        /* Failure is pretty bad, but we'd best soldier on. */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>