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 call to set_timer in vlapic.c. Should not set timer.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix call to set_timer in vlapic.c. Should not set timer.expires
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Mar 2006 17:20:08 +0000
Delivery-date: Wed, 08 Mar 2006 17:21:01 +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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 766817372cab8b42b542bf05386f0850b4ea61e1
# Parent  53b0dc1cb1db1ca55723d241758bceb4b0577801
Fix call to set_timer in vlapic.c. Should not set timer.expires
outside set_timer, since set_timer will do that for the caller.

Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>

diff -r 53b0dc1cb1db -r 766817372cab xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Wed Mar  8 14:39:59 2006
+++ b/xen/arch/x86/hvm/vlapic.c Wed Mar  8 14:49:04 2006
@@ -239,9 +239,7 @@
 
     case VLAPIC_DELIV_MODE_INIT:
         if ( !level && trig_mode == 1 )     //Deassert
-        {
             printk("This hvm_vlapic is for P4, no work for De-assert init\n");
-        }
         else
         {
             /* FIXME How to check the situation after vcpu reset? */
@@ -529,7 +527,6 @@
 
             counter_passed = passed /
                              (APIC_BUS_CYCLE_NS * vlapic->timer_divide_count);
-
             vlapic->timer_current_count -= counter_passed;
             if ( vlapic->timer_current_count <= 0 )
             {
@@ -769,16 +766,15 @@
             offset = APIC_BUS_CYCLE_NS *
                      vlapic->timer_divide_count *
                      vlapic->timer_initial_count;
-            vlapic->vlapic_timer.expires = now + offset;
-
-            set_timer(&vlapic->vlapic_timer, vlapic->vlapic_timer.expires);
+
+            set_timer(&vlapic->vlapic_timer, now + offset);
 
             HVM_DBG_LOG(DBG_LEVEL_VLAPIC,
                         "bus cycle is %"PRId64"ns, now 0x%016"PRIx64", "
                         "timer initial count 0x%x, offset 0x%016"PRIx64", "
                         "expire @ 0x%016"PRIx64".",
                         APIC_BUS_CYCLE_NS, now, vlapic->timer_initial_count,
-                        offset, vlapic->vlapic_timer.expires);
+                        offset, now + offset);
         }
         break;
 
@@ -873,8 +869,7 @@
         offset = APIC_BUS_CYCLE_NS *
                  vlapic->timer_divide_count *
                  vlapic->timer_initial_count;
-        vlapic->vlapic_timer.expires = now + offset;
-        set_timer(&vlapic->vlapic_timer, vlapic->vlapic_timer.expires);
+        set_timer(&vlapic->vlapic_timer, now + offset);
     }
     else
         vlapic->timer_current_count = 0;
@@ -890,7 +885,8 @@
                 "now 0x%016"PRIx64", expire @ 0x%016"PRIx64", "
                 "timer initial count 0x%x, timer current count 0x%x.",
                 now, vlapic->vlapic_timer.expires,
-                vlapic->timer_initial_count, vlapic->timer_current_count);
+                vlapic->timer_initial_count,
+                vlapic->timer_current_count);
 }
 
 #if 0

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix call to set_timer in vlapic.c. Should not set timer.expires, Xen patchbot -unstable <=