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] CPUIDLE: Disable APIC timer intr during C

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] CPUIDLE: Disable APIC timer intr during C3 while force hpetbroadcast
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Sep 2008 06:00:57 -0700
Delivery-date: Tue, 16 Sep 2008 06:02:27 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1221148204 -3600
# Node ID d8ce41b79ecc74c00797d73caa56dbdaf02bbd66
# Parent  fa2adc7fb996a1d2589e6d81c2eabbd6e115cc03
CPUIDLE: Disable APIC timer intr during C3 while force hpetbroadcast

It can avoid C3 early exit, and also this is conceptually clearer, as
at given time we only want one clock source to drive timers.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hpet.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff -r fa2adc7fb996 -r d8ce41b79ecc xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Thu Sep 11 15:17:31 2008 +0100
+++ b/xen/arch/x86/hpet.c       Thu Sep 11 16:50:04 2008 +0100
@@ -215,6 +215,8 @@ void hpet_broadcast_enter(void)
 
     spin_lock(&ch->lock);
 
+    disable_APIC_timer();
+
     cpu_set(smp_processor_id(), ch->cpumask);
 
     /* reprogram if current cpu expire time is nearer */
@@ -233,15 +235,13 @@ void hpet_broadcast_exit(void)
 
     if ( cpu_test_and_clear(cpu, ch->cpumask) )
     {
+        /* Cancel any outstanding LAPIC event and re-enable interrupts. */
+        reprogram_timer(0);
+        enable_APIC_timer();
+        
+        /* Reprogram the deadline; trigger timer work now if it has passed. */
         if ( !reprogram_timer(per_cpu(timer_deadline, cpu)) )
-        {
-            /*
-             * The deadline must have passed -- trigger timer work now.
-             * Also cancel any outstanding LAPIC event.
-             */
-            reprogram_timer(0);
             raise_softirq(TIMER_SOFTIRQ);
-        }
 
         if ( cpus_empty(ch->cpumask) && ch->next_event != STIME_MAX )
             reprogram_hpet_evt_channel(ch, STIME_MAX, 0, 0);

_______________________________________________
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] CPUIDLE: Disable APIC timer intr during C3 while force hpetbroadcast, Xen patchbot-unstable <=