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] [xen-3.1-testing] x86: Fix time-scale calculation to avo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] x86: Fix time-scale calculation to avoid #DE fault.
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Oct 2007 11:00:28 -0700
Delivery-date: Fri, 19 Oct 2007 11:01:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192127020 -3600
# Node ID 3a5f2601ac57a89a77f41d1c5855a6fee624465f
# Parent  97c651bac87fffb6b099c53baef79567ea487b8f
x86: Fix time-scale calculation to avoid #DE fault.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   16098:f6a06b2eefc5931a9cd9ec71baec94d67fe06909
xen-unstable date:        Thu Oct 11 19:23:40 2007 +0100
---
 xen/arch/x86/time.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 97c651bac87f -r 3a5f2601ac57 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Thu Oct 11 19:18:12 2007 +0100
+++ b/xen/arch/x86/time.c       Thu Oct 11 19:23:40 2007 +0100
@@ -215,6 +215,8 @@ static void set_time_scale(struct time_s
     u32 tps32;
     int shift = 0;
 
+    ASSERT(tps64 != 0);
+
     while ( tps64 > (MILLISECS(1000)*2) )
     {
         tps64 >>= 1;
@@ -222,7 +224,7 @@ static void set_time_scale(struct time_s
     }
 
     tps32 = (u32)tps64;
-    while ( tps32 < (u32)MILLISECS(1000) )
+    while ( tps32 <= (u32)MILLISECS(1000) )
     {
         tps32 <<= 1;
         shift++;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] x86: Fix time-scale calculation to avoid #DE fault., Xen patchbot-3.1-testing <=