aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-06-17 08:52:29 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-06-17 08:52:29 +0100
commitaa42fc0e9cd965a52fbcdc289bad94645ae59afe (patch)
treed8825f26808e6a773b9e9ddc6e20fd22d0110a63
parentcbfacd749c2522ef3645db7bbe7e6c0f214eea6d (diff)
downloadxen-aa42fc0e9cd965a52fbcdc289bad94645ae59afe.tar.gz
xen-aa42fc0e9cd965a52fbcdc289bad94645ae59afe.tar.bz2
xen-aa42fc0e9cd965a52fbcdc289bad94645ae59afe.zip
cpuidle: remove hpet access in hpet_broadcast_exit
hpet_broadcast_exit calls reprogram_hpet to stop possible hpet intr if the last deep-cstate waken up cpu is waken by unexpected intrs instead of hpet broadcast handler. This can be removed without brings much useless intrs, but bring chance for further optimization. It is a tradeoff between grace & optimization. BTW, move the cpumask set out of critial section in hpet_broadcast_enter to shorten it. Signed-off-by: Wei Gang <gang.wei@intel.com>
-rw-r--r--xen/arch/x86/hpet.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index 47cc82ea21..4bfc11d9c4 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -664,14 +664,12 @@ void hpet_broadcast_enter(void)
/* Disable LAPIC timer interrupts. */
disable_APIC_timer();
+ cpu_set(cpu, ch->cpumask);
spin_lock(&ch->lock);
-
- cpu_set(cpu, ch->cpumask);
/* reprogram if current cpu expire time is nearer */
if ( this_cpu(timer_deadline_end) < ch->next_event )
reprogram_hpet_evt_channel(ch, this_cpu(timer_deadline_end), NOW(), 1);
-
spin_unlock(&ch->lock);
}
@@ -692,11 +690,7 @@ void hpet_broadcast_exit(void)
raise_softirq(TIMER_SOFTIRQ);
spin_lock_irq(&ch->lock);
-
cpu_clear(cpu, ch->cpumask);
- if ( cpus_empty(ch->cpumask) && ch->next_event != STIME_MAX )
- reprogram_hpet_evt_channel(ch, STIME_MAX, 0, 0);
-
spin_unlock_irq(&ch->lock);
if ( ch != &legacy_hpet_event )