|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] [PATCH1/6] cpuidle: fix wrapped ticks calculation for p
To: |
Jan Beulich <JBeulich@xxxxxxxxxx> |
Subject: |
RE: [Xen-devel] [PATCH1/6] cpuidle: fix wrapped ticks calculation for pm timer |
From: |
"Wei, Gang" <gang.wei@xxxxxxxxx> |
Date: |
Thu, 17 Jun 2010 16:45:42 +0800 |
Accept-language: |
zh-CN, en-US |
Acceptlanguage: |
zh-CN, en-US |
Cc: |
"xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx> |
Delivery-date: |
Thu, 17 Jun 2010 01:47:17 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<4C19F68F0200007800006DF4@xxxxxxxxxxxxxxxxxx> |
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> |
References: |
<F26D193E20BBDC42A43B611D1BDEDE710F70FB8656@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4C19F68F0200007800006DF4@xxxxxxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
Thread-index: |
AcsN9b8qRRw6iPB1S12IMTY1MZMo/AAAm24g |
Thread-topic: |
[Xen-devel] [PATCH1/6] cpuidle: fix wrapped ticks calculation for pm timer |
On Thursday, 2010-6-17 4:19 PM, Jan Beulich wrote:
>>>> On 17.06.10 at 09:37, "Wei, Gang" <gang.wei@xxxxxxxxx> wrote:
>> 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);
>
> Why can't this then also just be (t2 - t1)?
Yes, you are right. We could simply just let it be (t2 - t1) here. But it would
depend on the t1/t2 type. Current version didn't depend on the input types
which will be changed by later patch.
Jimmy
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|