ia64/xen-unstable

changeset 18073:099aaca15ae6

x86: Adjust handle_hpet_broadcast to let it run better before broadcast exit

Since hpet_broadcast_exit has been moved after interrupt enabled in C3
case, so adjust the handler of hpet broadcast to adapt to this.
Meanwhile, remove a freqently executed debug print line to simplify
the serial output.

Signed-off-by: Wei Gang <gang.wei@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jul 16 13:54:02 2008 +0100 (2008-07-16)
parents 9361e140fee3
children 806e66a6cb1a
files xen/arch/x86/hpet.c
line diff
     1.1 --- a/xen/arch/x86/hpet.c	Wed Jul 16 13:50:47 2008 +0100
     1.2 +++ b/xen/arch/x86/hpet.c	Wed Jul 16 13:54:02 2008 +0100
     1.3 @@ -95,13 +95,8 @@ static int reprogram_hpet_evt_channel(
     1.4      }
     1.5  
     1.6      delta = expire - now;
     1.7 -    if ( delta <= 0 )
     1.8 -    {
     1.9 -        printk(KERN_DEBUG "reprogram: expire(%"PRIx64") < "
    1.10 -               "now(%"PRIx64")\n", expire, now);
    1.11 -        if ( !force )
    1.12 -            return -ETIME;
    1.13 -    }
    1.14 +    if ( (delta <= 0) && !force )
    1.15 +        return -ETIME;
    1.16  
    1.17      ch->next_event = expire;
    1.18  
    1.19 @@ -142,12 +137,10 @@ static void handle_hpet_broadcast(struct
    1.20  {
    1.21      cpumask_t mask;
    1.22      s_time_t now, next_event;
    1.23 -    int cpu, current_cpu = smp_processor_id();
    1.24 +    int cpu;
    1.25  
    1.26      spin_lock(&ch->lock);
    1.27  
    1.28 -    if ( cpu_isset(current_cpu, ch->cpumask) )
    1.29 -        printk(KERN_DEBUG "WARNING: current cpu%d in bc_mask\n", current_cpu);
    1.30  again:
    1.31      ch->next_event = STIME_MAX;
    1.32      next_event = STIME_MAX;
    1.33 @@ -162,8 +155,6 @@ again:
    1.34          else if ( per_cpu(timer_deadline, cpu) < next_event )
    1.35              next_event = per_cpu(timer_deadline, cpu);
    1.36      }
    1.37 -    if ( per_cpu(timer_deadline, current_cpu) <= now )
    1.38 -        cpu_set(current_cpu, mask);
    1.39  
    1.40      /* wakeup the cpus which have an expired event. */
    1.41      evt_do_broadcast(mask);