ia64/xen-unstable
changeset 18480:d8ce41b79ecc
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@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
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@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Sep 11 16:50:04 2008 +0100 (2008-09-11) |
parents | fa2adc7fb996 |
children | a5cc38391afb |
files | xen/arch/x86/hpet.c |
line diff
1.1 --- a/xen/arch/x86/hpet.c Thu Sep 11 15:17:31 2008 +0100 1.2 +++ b/xen/arch/x86/hpet.c Thu Sep 11 16:50:04 2008 +0100 1.3 @@ -215,6 +215,8 @@ void hpet_broadcast_enter(void) 1.4 1.5 spin_lock(&ch->lock); 1.6 1.7 + disable_APIC_timer(); 1.8 + 1.9 cpu_set(smp_processor_id(), ch->cpumask); 1.10 1.11 /* reprogram if current cpu expire time is nearer */ 1.12 @@ -233,15 +235,13 @@ void hpet_broadcast_exit(void) 1.13 1.14 if ( cpu_test_and_clear(cpu, ch->cpumask) ) 1.15 { 1.16 + /* Cancel any outstanding LAPIC event and re-enable interrupts. */ 1.17 + reprogram_timer(0); 1.18 + enable_APIC_timer(); 1.19 + 1.20 + /* Reprogram the deadline; trigger timer work now if it has passed. */ 1.21 if ( !reprogram_timer(per_cpu(timer_deadline, cpu)) ) 1.22 - { 1.23 - /* 1.24 - * The deadline must have passed -- trigger timer work now. 1.25 - * Also cancel any outstanding LAPIC event. 1.26 - */ 1.27 - reprogram_timer(0); 1.28 raise_softirq(TIMER_SOFTIRQ); 1.29 - } 1.30 1.31 if ( cpus_empty(ch->cpumask) && ch->next_event != STIME_MAX ) 1.32 reprogram_hpet_evt_channel(ch, STIME_MAX, 0, 0);