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-devel

[Xen-devel] [PATCH1/6] cpuidle: fix wrapped ticks calculation for pm tim

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH1/6] cpuidle: fix wrapped ticks calculation for pm timer
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Thu, 17 Jun 2010 15:37:31 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Thu, 17 Jun 2010 00:40:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsN7/H48kncRMmqROS1Td1tlotXYg==
Thread-topic: [PATCH1/6] cpuidle: fix wrapped ticks calculation for pm timer
cpuidle: fix wrapped ticks calculation for pm timer.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>

diff -r 26c2922da53c xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c      Thu May 27 09:39:47 2010 +0100
+++ b/xen/arch/x86/acpi/cpu_idle.c      Sun Jun 13 06:44:32 2010 +0800
@@ -137,9 +137,9 @@ static inline u32 ticks_elapsed(u32 t1, 
     if ( t2 >= t1 )
         return (t2 - t1);
     else if ( !(acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER) )
-        return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF);
+        return (((0x00FFFFFF - t1) + t2 + 1) & 0x00FFFFFF);
     else
-        return ((0xFFFFFFFF - t1) + t2);
+        return ((0xFFFFFFFF - t1) + t2 +1);
 }
 
 static void acpi_safe_halt(void)

Attachment: 1-cpuidle-fix-ticks_elapsed.patch
Description: 1-cpuidle-fix-ticks_elapsed.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>