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-unstable] [HVM] Minor HPET fixes/ and cleanups.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Minor HPET fixes/ and cleanups.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 30 Dec 2006 05:20:06 -0800
Delivery-date: Sat, 30 Dec 2006 05:20:20 -0800
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 kaf24@xxxxxxxxxxxxxxxxxxxxx
# Date 1167482971 0
# Node ID a578c9703416de6cde4d7aabcc6f1a9910a012c8
# Parent  444315d1ca5ad51b0e7f843c15d21678215cc78b
[HVM] Minor HPET fixes/ and cleanups.
In particular, the definition of HPET_TN_SIZE_CAP is wrong.

From: Dexuan Cui <dexuan.cui@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/hpet.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff -r 444315d1ca5a -r a578c9703416 xen/arch/x86/hvm/hpet.c
--- a/xen/arch/x86/hvm/hpet.c   Fri Dec 29 20:17:01 2006 +0000
+++ b/xen/arch/x86/hvm/hpet.c   Sat Dec 30 12:49:31 2006 +0000
@@ -52,9 +52,9 @@
 #define HPET_TN_ENABLE           0x004
 #define HPET_TN_PERIODIC         0x008
 #define HPET_TN_PERIODIC_CAP     0x010
+#define HPET_TN_SIZE_CAP         0x020
 #define HPET_TN_SETVAL           0x040
 #define HPET_TN_32BIT            0x100
-#define HPET_TN_SIZE_CAP         0x200
 #define HPET_TN_INT_ROUTE_MASK  0x3e00
 #define HPET_TN_INT_ROUTE_SHIFT      9
 #define HPET_TN_INT_ROUTE_CAP_SHIFT 32
@@ -91,7 +91,8 @@ static inline uint64_t hpet_read64(HPETS
     return (addr >= HPET_T3_CFG) ? 0 : *p;
 }
 
-static int hpet_check_access_length(unsigned long addr, unsigned long len)
+static inline int hpet_check_access_length(
+    unsigned long addr, unsigned long len)
 {
     if ( (addr & (len - 1)) || (len > 8) )
     {
@@ -104,7 +105,7 @@ static int hpet_check_access_length(unsi
     return 0;
 }
 
-static uint64_t hpet_update_maincounter(HPETState *h)
+static inline uint64_t hpet_read_maincounter(HPETState *h)
 {
     if ( hpet_enabled(h) )
         return hvm_get_guest_time(h->vcpu) + h->mc_offset;
@@ -126,7 +127,7 @@ static unsigned long hpet_read(
 
     val = hpet_read64(h, addr & ~7);
     if ( (addr & ~7) == HPET_COUNTER )
-        val = hpet_update_maincounter(h);
+        val = hpet_read_maincounter(h);
 
     result = val;
     if ( length != 8 )
@@ -159,7 +160,7 @@ static void hpet_set_timer(HPETState *h,
     }
 
     tn_cmp   = h->hpet.timers[tn].cmp;
-    cur_tick = hpet_update_maincounter(h);
+    cur_tick = hpet_read_maincounter(h);
     if ( timer_is_32bit(h, tn) )
     {
         tn_cmp   = (uint32_t)tn_cmp;
@@ -173,7 +174,8 @@ static void hpet_set_timer(HPETState *h,
         set_timer(&h->timers[tn], NOW());
 }
 
-static uint64_t hpet_fixup_reg(uint64_t new, uint64_t old, uint64_t mask)
+static inline uint64_t hpet_fixup_reg(
+    uint64_t new, uint64_t old, uint64_t mask)
 {
     new &= mask;
     new |= old & ~mask;
@@ -195,7 +197,7 @@ static void hpet_write(
 
     old_val = hpet_read64(h, addr & ~7);
     if ( (addr & ~7) == HPET_COUNTER )
-        old_val = hpet_update_maincounter(h);
+        old_val = hpet_read_maincounter(h);
 
     new_val = val;
     if ( length != 8 )
@@ -340,7 +342,7 @@ static void hpet_timer_fn(void *opaque)
 
     if ( timer_is_periodic(h, tn) && (h->period[tn] != 0) )
     {
-        uint64_t mc = hpet_update_maincounter(h);
+        uint64_t mc = hpet_read_maincounter(h);
         if ( timer_is_32bit(h, tn) )
         {
             while ( hpet_time_after(mc, h->hpet.timers[tn].cmp) )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [HVM] Minor HPET fixes/ and cleanups., Xen patchbot-unstable <=