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

RE: [Xen-devel] [RFC] Remove the x86 Periodic 100HZ PIT TimerInterrupt

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [RFC] Remove the x86 Periodic 100HZ PIT TimerInterrupt
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Fri, 11 Apr 2008 15:46:17 +0800
Delivery-date: Fri, 11 Apr 2008 00:53:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C423E19A.1EFFA%keir.fraser@xxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1104166E0B63A341805FDB977862AAD2015E3343@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C423E19A.1EFFA%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AciYkFQNYmyqI0NSRKuabH1qVznbFQABlbckAB8ySAAADBThegBoLeBgAAPbR+MAB/rDsAAArOS1ACQqQqA=
Thread-topic: [Xen-devel] [RFC] Remove the x86 Periodic 100HZ PIT TimerInterrupt
Keir Fraser wrote:
> On 10/4/08 15:11, "Yu, Ke" <ke.yu@xxxxxxxxx> wrote:
> 
>> One glance showes calling late_time_init() in time_resume() should
>> work. I will test this and send out the patch later.
> 
> Looks like it would work. While you're at it rename late_time_init()
> to maybe_disable_pit_irq() or something similarly informative.
> 
>  -- Keir

The attached is the patch for this. It has been tested against changeset
17433. Wall clock time works fine after host S3 suspend/resume.

diff -r 8d750b7acfa3 -r c05b191c8e2a xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Thu Apr 10 11:11:25 2008 +0100
+++ b/xen/arch/x86/time.c       Fri Apr 11 15:18:45 2008 +0800
@@ -990,7 +990,7 @@ void __init early_time_init(void)
     setup_irq(0, &irq0);
 }
 
-static int __init late_time_init(void)
+static int __init disable_pit_irq(void)
 {
     if ( !using_pit && cpu_has_apic )
     {
@@ -1001,7 +1001,7 @@ static int __init late_time_init(void)
     }
     return 0;
 }
-__initcall(late_time_init);
+__initcall(disable_pit_irq);
 
 void send_timer_event(struct vcpu *v)
 {
@@ -1035,6 +1035,8 @@ int time_resume(void)
 int time_resume(void)
 {
     u64 tmp = init_pit_and_calibrate_tsc();
+
+    disable_pit_irq();
 
     set_time_scale(&this_cpu(cpu_time).tsc_scale, tmp);
 

Best Regards
Ke

Attachment: disable_pit_irq_s3.patch
Description: disable_pit_irq_s3.patch

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